Skip to content

Fix/mfa sms test #6146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cd4fe27
added emailmfa attribute to first user sign up in test
ekjotmultani May 5, 2025
2f207c2
updated test
ekjotmultani May 5, 2025
ffd8691
formatting
ekjotmultani May 5, 2025
f454bde
changed confirmation value of sign in portion
ekjotmultani May 6, 2025
61899ba
updated second test
ekjotmultani May 7, 2025
d74e36a
updated portion of test which verifies that we can set sms mfa to be …
ekjotmultani May 7, 2025
ca60c16
updated test order
ekjotmultani May 7, 2025
1343287
removed sign out when user is not signed in
ekjotmultani May 7, 2025
7ebded3
changed mfa preference flow for verifying if we can set sms as prefer…
ekjotmultani May 8, 2025
3facd61
formatting
ekjotmultani May 8, 2025
1796341
formatting
ekjotmultani May 8, 2025
a8bc0c1
sign out user before signing in
ekjotmultani May 8, 2025
d404149
updating test
ekjotmultani May 9, 2025
f838a69
formatting
ekjotmultani May 9, 2025
b25f0ab
removed unused variable
ekjotmultani May 9, 2025
2208705
formatting
ekjotmultani May 9, 2025
67c1e32
updated test
ekjotmultani May 9, 2025
a6dd53e
formatting
ekjotmultani May 9, 2025
be8ccc9
changed accepted mfa types for default to sms test
ekjotmultani May 9, 2025
908943c
updates
ekjotmultani May 12, 2025
1a97fd4
cleaned up comments
ekjotmultani May 12, 2025
5bff06c
removed duplicate test and changed "because" clause of test
ekjotmultani May 13, 2025
46e1661
formatting
ekjotmultani May 13, 2025
beee3b2
changed test text to properly reflect the flow of the test
ekjotmultani May 13, 2025
fcfc3e0
updated authenticator test to match new flow
ekjotmultani May 15, 2025
6a9d1a5
updated expect function to include mfa selection
ekjotmultani May 15, 2025
5c43692
updated expect block for "can select SMS MFA"
ekjotmultani May 16, 2025
69b7f55
updated expect further
ekjotmultani May 16, 2025
b36ec06
futher updates
ekjotmultani May 16, 2025
94d05d1
added back otp code check
ekjotmultani May 16, 2025
db45769
Merge branch 'main' into fix/mfa_sms_test
ekjotmultani May 16, 2025
bdd7558
Merge branch 'main' of https://github.com/aws-amplify/amplify-flutter…
ekjotmultani May 16, 2025
1be2b6d
Merge branch 'fix/mfa_sms_test' of https://github.com/aws-amplify/amp…
ekjotmultani May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void main() {
tester.bloc.stream,
emitsInOrder([
UnauthenticatedState.signIn,
isA<ContinueSignInWithMfaSelection>(),
UnauthenticatedState.confirmSignInMfa,
isA<AuthenticatedState>(),
UnauthenticatedState.signIn,
Expand All @@ -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();

Expand Down Expand Up @@ -139,6 +149,7 @@ void main() {
tester.bloc.stream,
emitsInOrder([
UnauthenticatedState.signIn,
isA<ContinueSignInWithMfaSelection>(),
UnauthenticatedState.confirmSignInMfa,
isA<AuthenticatedState>(),
UnauthenticatedState.signIn,
Expand All @@ -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();

Expand Down Expand Up @@ -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();

Expand Down
Loading