Skip to content

Commit

Permalink
fix(e2e): add error fixture for sign-in-sms-mfa invalid code test (#4932
Browse files Browse the repository at this point in the history
)
  • Loading branch information
calebpollman authored Jan 22, 2024
1 parent f45bffc commit 0ac1fab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 4 additions & 0 deletions packages/e2e/cypress/fixtures/code-mismatch-exception.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"__type": "CodeMismatchException",
"message": "Invalid code or auth state for the user."
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,15 @@ Feature: Sign In with SMS MFA
Then I type my "phone number" with status "CONFIRMED"
Then I type my password
Then I click the "Sign in" button
Then I will be redirected to the confirm sms mfa page
Then I see "Confirm SMS Code"
Then I type a valid SMS confirmation code
Then I spy request '{ "headers": { "X-Amz-Target": "AWSCognitoIdentityProviderService.RespondToAuthChallenge" } }'
Then I click the "Confirm" button
Then I confirm request '{"headers": { "X-Amz-Target": "AWSCognitoIdentityProviderService.RespondToAuthChallenge" } }'

@angular @react @vue
Scenario: Sign in using a valid phone number and SMS MFA
When I select my country code with status "CONFIRMED"
Then I type my "phone number" with status "CONFIRMED"
Then I type my password
Then I click the "Sign in" button
Then I will be redirected to the confirm sms mfa page

@angular @react @vue
Scenario: Redirect to sign in page
Scenario: Sign in and navigate back to sign in page
When I select my country code with status "CONFIRMED"
Then I type my "phone number" with status "CONFIRMED"
Then I type my password
Expand All @@ -43,6 +36,7 @@ Feature: Sign In with SMS MFA
Then I click the "Sign in" button
Then I type an invalid SMS code
Then I click the "Confirm" button
Then I intercept '{ "headers": { "X-Amz-Target": "AWSCognitoIdentityProviderService.RespondToAuthChallenge" } }' with error fixture "code-mismatch-exception"
Then I see "invalid code"

@angular @react @vue
Expand Down

0 comments on commit 0ac1fab

Please sign in to comment.