Skip to content

Commit 4e943d7

Browse files
chore: update authenticator tests (#5296)
1 parent dc33017 commit 4e943d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_sms_totp_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ void main() {
1414
testRunner.setupTests();
1515

1616
group('sign-in-sms-totp-mfa', () {
17-
testRunner.withEnvironment(MfaEnvironment.mfaRequiredSmsTotp, () {
17+
testRunner.withEnvironment(mfaRequiredSmsTotp, (env) {
1818
// Scenario: Sign in using a totp code when both SMS and TOTP are enabled
1919
testWidgets('can select TOTP MFA', (tester) async {
20-
final username = generateUsername();
20+
final username = env.generateUsername();
2121
final password = generatePassword();
2222
final phoneNumber = generateUSPhoneNumber();
2323

@@ -121,7 +121,7 @@ void main() {
121121

122122
// Scenario: Sign in using a SMS code when both SMS and TOTP are enabled
123123
testWidgets('can select SMS MFA', (tester) async {
124-
final username = generateUsername();
124+
final username = env.generateUsername();
125125
final password = generatePassword();
126126
final phoneNumber = generateUSPhoneNumber();
127127

packages/authenticator/amplify_authenticator/example/integration_test/sign_in_mfa_totp_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ void main() {
1414
testRunner.setupTests();
1515

1616
group('sign-in-totp-mfa', () {
17-
testRunner.withEnvironment(MfaEnvironment.mfaRequiredTotp, () {
17+
testRunner.withEnvironment(mfaRequiredTotp, (env) {
1818
// Scenario: Sign in using a totp code
1919
testWidgets('Setup & Sign in with TOTP MFA', (tester) async {
20-
final username = generateUsername();
20+
final username = env.generateUsername();
2121
final password = generatePassword();
2222
late String sharedSecret;
2323

0 commit comments

Comments
 (0)