@legacy
@oa
Feature: OA Login
  # Scenarios no longer relevant due to changes to login flow. Need to remove and add scenarios for SME user login and
  # non orchard/SME domain login

  @wip
  Scenario: OA valid login
    Given I am OA unauthenticated
    And I am not whitelisted for two-factor authentication
    When I log in to OA
    Then I should be on the OA verification page
    When I follow the sent verification link
    Then I should be logged in to OA
    When I log out of OA
    Then I should be logged out of OA

  # TODO: Create test fixtures
  @wip
  Scenario: OA valid login with expired verification link
    Given I am OA unauthenticated
    When I navigate to an expired verification URL
    Then I should be logged out of OA
    And I should see an error that the verification link has expired

  @wip
  @smoke_dev
  Scenario: OA valid login with used verification link
    Given I am OA unauthenticated
    When I navigate to a used verification URL
    Then I should be logged out of OA
    And I should see an error that the verification link has expired

  @wip
  @smoke_dev
  Scenario: OA invalid login
    Given I am OA unauthenticated
    When I attempt to log in to OA with invalid credentials
    Then I should be logged out of OA
    And I should see an OA error message
