Skip to content

Commit 0bd0842

Browse files
committed
chore: add find email mfa radio select widget
1 parent d196c8f commit 0bd0842

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/authenticator/amplify_authenticator_test/lib/src/pages/confirm_sign_in_page.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ class ConfirmSignInPage extends AuthenticatorPage {
172172

173173
final mfaMethodWidget = find.descendant(
174174
of: selectMfaSetupRadio,
175-
matching: find.textContaining('(${mfaMethod.name.toUpperCase()})'),
175+
matching: find.textContaining(
176+
mfaMethod == MfaType.email
177+
? 'Email'
178+
: '(${mfaMethod.name.toUpperCase()})',
179+
),
176180
);
177181

178182
await tester.tap(mfaMethodWidget);
@@ -186,6 +190,13 @@ class ConfirmSignInPage extends AuthenticatorPage {
186190
await tester.pumpAndSettle();
187191
}
188192

193+
/// When I click the continue sign in with MFA setup selection button
194+
Future<void> submitConfirmSignInMfaSetupSelection() async {
195+
await tester.ensureVisible(confirmSignInMfaSetupSelectionButton);
196+
await tester.tap(confirmSignInMfaSetupSelectionButton);
197+
await tester.pumpAndSettle();
198+
}
199+
189200
/// When I navigate to the "Sign In" step.
190201
Future<void> navigateToSignIn() async {
191202
await tester.tap(backToSignIn);

0 commit comments

Comments
 (0)