From 5820011cb6e92d893496ae081c377e7be2c7e805 Mon Sep 17 00:00:00 2001 From: Elijah Quartey Date: Wed, 22 Nov 2023 10:51:50 -0600 Subject: [PATCH] chore(authenticator): added missing widget keys (#4171) --- .../sign_in_force_new_password_test.dart | 15 +++----------- .../sign_in_mfa_sms_test.dart | 20 ++++--------------- .../sign_in_with_phone_test.dart | 8 +------- .../sign_up_with_phone_test.dart | 3 +-- .../src/mixins/authenticator_phone_field.dart | 12 +++++++++++ .../lib/src/pages/authenticator_page.dart | 12 +++++++---- 6 files changed, 29 insertions(+), 41 deletions(-) diff --git a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_force_new_password_test.dart b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_force_new_password_test.dart index c48fd4d1ab..cb13be0c85 100644 --- a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_force_new_password_test.dart +++ b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_force_new_password_test.dart @@ -58,10 +58,7 @@ void main() { ]), ); - // When I select my country code with status "FORCE_CHANGE_PASSWORD" - await po.selectCountryCode(); - - // And I type my "phone number" with status "FORCE_CHANGE_PASSWORD" + // When I type my "phone number" with status "FORCE_CHANGE_PASSWORD" await po.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password @@ -95,10 +92,7 @@ void main() { ]), ); - // When I select my country code with status "FORCE_CHANGE_PASSWORD" - await po.selectCountryCode(); - - // And I type my "phone number" with status "FORCE_CHANGE_PASSWORD" + // When I type my "phone number" with status "FORCE_CHANGE_PASSWORD" await po.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password @@ -148,10 +142,7 @@ void main() { ]), ); - // When I select my country code with status "FORCE_CHANGE_PASSWORD" - await po.selectCountryCode(); - - // And I type my "phone number" with status "FORCE_CHANGE_PASSWORD" + // When I type my "phone number" with status "FORCE_CHANGE_PASSWORD" await po.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password diff --git a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_test.dart b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_test.dart index 8b55c2a21f..0fce2dc10b 100644 --- a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_test.dart +++ b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_test.dart @@ -58,10 +58,7 @@ void main() { signInPage.expectUsername(label: 'Phone Number'); - // When I select my country code - await signInPage.selectCountryCode(); - - // And I type my "phone number" with status "CONFIRMED" + // When I type my "phone number" with status "CONFIRMED" await signInPage.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password @@ -95,10 +92,7 @@ void main() { signInPage.expectUsername(label: 'Phone Number'); - // When I select my country code - await signInPage.selectCountryCode(); - - // And I type my "phone number" with status "CONFIRMED" + // When I type my "phone number" with status "CONFIRMED" await signInPage.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password @@ -134,10 +128,7 @@ void main() { signInPage.expectUsername(label: 'Phone Number'); - // When I select my country code - await signInPage.selectCountryCode(); - - // And I type my "phone number" with status "CONFIRMED" + // When I type my "phone number" with status "CONFIRMED" await signInPage.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password @@ -174,10 +165,7 @@ void main() { final signInPage = SignInPage(tester: tester); - // When I select my country code - await signInPage.selectCountryCode(); - - // And I type my "phone number" with status "UNKNOWN" + // When I type my "phone number" with status "UNKNOWN" await signInPage.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password diff --git a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_with_phone_test.dart b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_with_phone_test.dart index c4385b66ea..ed3e5e8d4d 100644 --- a/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_with_phone_test.dart +++ b/packages/authenticator/amplify_authenticator/example/integration_test/sign_in_with_phone_test.dart @@ -43,10 +43,7 @@ void main() { final signInPage = SignInPage(tester: tester); - // When I select my country code - await signInPage.selectCountryCode(); - - // And I type my "phone number" with status "UNKNOWN" + // When I type my "phone number" with status "UNKNOWN" await signInPage.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password @@ -92,9 +89,6 @@ void main() { signInPage.expectUsername(label: 'Phone Number'); - // When I select my country code - await signInPage.selectCountryCode(); - // When I type my "username" with status "unconfirmed" await signInPage.enterUsername(phoneNumber.withOutCountryCode()); diff --git a/packages/authenticator/amplify_authenticator/example/integration_test/sign_up_with_phone_test.dart b/packages/authenticator/amplify_authenticator/example/integration_test/sign_up_with_phone_test.dart index 9b223b251a..2655f3f37c 100644 --- a/packages/authenticator/amplify_authenticator/example/integration_test/sign_up_with_phone_test.dart +++ b/packages/authenticator/amplify_authenticator/example/integration_test/sign_up_with_phone_test.dart @@ -96,8 +96,7 @@ void main() { final password = generatePassword(); final email = generateEmail(); - // When I select my country code - await signUpPage.selectCountryCode(); + // When I enter my phone number await signUpPage.enterUsername(phoneNumber.withOutCountryCode()); // And I type my password diff --git a/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_phone_field.dart b/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_phone_field.dart index a03679c879..2cb57fa159 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_phone_field.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_phone_field.dart @@ -68,6 +68,7 @@ mixin AuthenticatorPhoneFieldMixin