diff --git a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_email_test.dart b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_email_test.dart index 9ecc0cde14..8a6cf84a52 100644 --- a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_email_test.dart +++ b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_email_test.dart @@ -43,6 +43,7 @@ void main() { tester.bloc.stream, emitsInOrder([ UnauthenticatedState.signIn, + isA(), UnauthenticatedState.confirmSignInMfa, isA(), UnauthenticatedState.signIn, @@ -68,6 +69,15 @@ void main() { // And I click the "Sign in" button await signInPage.submitSignIn(); + // Then I will be redirected to chose MFA type + await confirmSignInPage.expectConfirmSignInMfaSelectionIsPresent(); + + // When I select "TOTP" + await confirmSignInPage.selectMfaMethod(mfaMethod: MfaType.sms); + + // And I click the "Confirm" button + await confirmSignInPage.submitConfirmSignInMfaSelection(); + // Then I will be redirected to the confirm sms mfa page await confirmSignInPage.expectConfirmSignInMFAIsPresent(); @@ -139,6 +149,7 @@ void main() { tester.bloc.stream, emitsInOrder([ UnauthenticatedState.signIn, + isA(), UnauthenticatedState.confirmSignInMfa, isA(), UnauthenticatedState.signIn, @@ -164,6 +175,15 @@ void main() { // And I click the "Sign in" button await signInPage.submitSignIn(); + // Then I will be redirected to chose MFA type + await confirmSignInPage.expectConfirmSignInMfaSelectionIsPresent(); + + // When I select "TOTP" + await confirmSignInPage.selectMfaMethod(mfaMethod: MfaType.sms); + + // And I click the "Confirm" button + await confirmSignInPage.submitConfirmSignInMfaSelection(); + // Then I will be redirected to the confirm sms mfa page await confirmSignInPage.expectConfirmSignInMFAIsPresent(); @@ -202,6 +222,15 @@ void main() { // And I click the "Sign in" button await signInPage.submitSignIn(); + // Then I will be redirected to chose MFA type + await confirmSignInPage.expectConfirmSignInMfaSelectionIsPresent(); + + // When I select "TOTP" + await confirmSignInPage.selectMfaMethod(mfaMethod: MfaType.sms); + + // And I click the "Confirm" button + await confirmSignInPage.submitConfirmSignInMfaSelection(); + // Then I will be redirected to the confirm sms mfa page await confirmSignInPage.expectConfirmSignInMFAIsPresent();