@fixture.usm
@fixture.boto3
Feature: Log out from the SME-DNA group and USM

  Scenario: Successfully log out
    Given there exists a DNA account
      | field              | value                                    |
      | sub                | sme-dna/6eca3c0bc7828ec06577129552b006e2 |
      | usm_account        | jason.whittle.sme@sonymusic.com          |
      | preferred_username | jason.whittle.sme@sonymusic.com          |
      | given_name         | Jason                                    |
      | family_name        | Whittle                                  |
      | email              | jason.whittle.sme@sonymusic.com          |
    And I have a USM id token for that USM account
    And I have a DNA bearer token for that DNA account
    When I visit the logout page
    Then I should get redirected to the USM logout URL with
      | query param              | value                                     |
      | id_token_hint            | <usm_id_token>                            |
      | state                    | <any>                                     |
      | post_logout_redirect_uri | https://atlas_um.test/usm/logout/callback |
    And I should be assigned a session state matching the state param
    When I complete my USM logout and return to the logout callback
    Then I should not have a USM id token
    And I should not have a DNA bearer token
    And I should be redirected to the userinfo page
