Skip to content

Commit 3a8a1f1

Browse files
committed
chore: remove commented code and print statements
1 parent 63077c8 commit 3a8a1f1

File tree

7 files changed

+1
-44
lines changed

7 files changed

+1
-44
lines changed

packages/auth/amplify_auth_cognito/example/integration_test/mfa_email_optional_test.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ void main() {
1818
final username = env.generateUsername();
1919
final password = generatePassword();
2020

21-
safePrint('USERNAME: $username');
22-
safePrint('ENV USERNAME: ${env.getDefaultAttributes(username)}');
23-
2421
final user = await adminCreateUser(
2522
username,
2623
password,
@@ -31,8 +28,6 @@ void main() {
3128
},
3229
);
3330

34-
safePrint('USER: $user');
35-
3631
final signInRes = await Amplify.Auth.signIn(
3732
username: username,
3833
password: password,

packages/auth/amplify_auth_cognito/example/integration_test/mfa_email_required_test.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ void main() {
2222
env.getLoginAttribute(username),
2323
);
2424

25-
safePrint('USERNAME: $username');
26-
safePrint('ENV USERNAME: ${env.getDefaultAttributes(username)}');
27-
28-
final user = await adminCreateUser(
25+
await adminCreateUser(
2926
username,
3027
password,
3128
autoConfirm: true,
@@ -35,8 +32,6 @@ void main() {
3532
},
3633
);
3734

38-
safePrint('USER: $user');
39-
4035
final signInRes = await Amplify.Auth.signIn(
4136
username: username,
4237
password: password,

packages/auth/amplify_auth_cognito/example/integration_test/mfa_sms_email_required_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ void main() {
122122
),
123123
);
124124

125-
safePrint('${await cognitoPlugin.fetchMfaPreference()}');
126-
127125
await cognitoPlugin.updateMfaPreference(
128126
email: MfaPreference.preferred,
129127
);

packages/auth/amplify_auth_cognito/example/integration_test/mfa_username_login_required_test.dart

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ void main() {
204204
.has((d) => d.deliveryMedium, 'deliveryMedium')
205205
.equals(DeliveryMedium.email);
206206

207-
safePrint('RESIGN IN RES: $resignInRes');
208-
209207
final confirmRes2 = await Amplify.Auth.confirmSignIn(
210208
confirmationValue: await otpResult2.code,
211209
);
@@ -220,12 +218,6 @@ void main() {
220218
),
221219
);
222220

223-
// await cognitoPlugin.updateMfaPreference(
224-
// totp: MfaPreference.preferred,
225-
// );
226-
227-
// check(setupRes.nextStep.signInStep).equals(AuthSignInStep.done);
228-
229221
// sign out and sign back in and confirm TOTP
230222
await signOutUser(assertComplete: true);
231223

@@ -234,8 +226,6 @@ void main() {
234226
password: password,
235227
);
236228

237-
safePrint('RESIGN IN RES 2: $resignInRes2');
238-
239229
check(resignInRes2.nextStep.signInStep)
240230
.equals(AuthSignInStep.continueSignInWithMfaSelection);
241231

@@ -244,11 +234,6 @@ void main() {
244234
confirmationValue: 'TOTP',
245235
);
246236

247-
safePrint('SELECT RES 2: $selectRes2');
248-
249-
// final sharedSecret =
250-
// selectRes2.nextStep.totpSetupDetails!.sharedSecret;
251-
252237
final confirmRes3 = await Amplify.Auth.confirmSignIn(
253238
confirmationValue: await generateTotpCode(),
254239
);

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ void main() {
7272
// Then I see the authenticated app
7373
await signInPage.expectAuthenticated();
7474

75-
/// Sign out and login again with EMAIL OTP code
76-
/// validates [AuthenticatorStep.confirmSignInWithEmailMfaCode]
77-
7875
// When I sign out using Auth.signOut()
7976
await Amplify.Auth.signOut();
8077
await tester.pumpAndSettle();

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ void main() {
4646
UnauthenticatedState.confirmSignInMfa,
4747
isA<AuthenticatedState>(),
4848
UnauthenticatedState.signIn,
49-
// isA<ContinueSignInWithMfaSelection>(),
5049
UnauthenticatedState.confirmSignInWithEmailMfaCode,
5150
isA<AuthenticatedState>(),
5251
emitsDone,
@@ -81,7 +80,6 @@ void main() {
8180
await signInPage.expectAuthenticated();
8281

8382
// When I enable EMAIL for MFA instead of the default set up by cognito (SMS)
84-
// await setUpTotp();
8583
await setUpEmailMfa();
8684

8785
// And I sign out using Auth.signOut()
@@ -143,7 +141,6 @@ void main() {
143141
UnauthenticatedState.confirmSignInMfa,
144142
isA<AuthenticatedState>(),
145143
UnauthenticatedState.signIn,
146-
// isA<ContinueSignInWithMfaSelection>(),
147144
UnauthenticatedState.confirmSignInMfa,
148145
isA<AuthenticatedState>(),
149146
emitsDone,
@@ -199,18 +196,9 @@ void main() {
199196
// And I click the "Sign in" button
200197
await signInPage.submitSignIn();
201198

202-
// Then I will be redirected to the MFA selection page
203-
// await confirmSignInPage.expectConfirmSignInMfaSelectionIsPresent();
204-
205199
final smsResult_2 =
206200
await getOtpCode(UserAttribute.phone(phoneNumber.toE164()));
207201

208-
// When I select "SMS"
209-
// await confirmSignInPage.selectMfaMethod(mfaMethod: MfaType.sms);
210-
211-
// And I click the "Confirm" button
212-
// await confirmSignInPage.submitConfirmSignInMfaSelection();
213-
214202
// Then I will be redirected to the confirm sms mfa page
215203
await confirmSignInPage.expectConfirmSignInMFAIsPresent();
216204

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ void main() {
166166
isA<AuthenticatedState>(),
167167
UnauthenticatedState.signIn,
168168
UnauthenticatedState.confirmSignInWithTotpMfaCode,
169-
// UnauthenticatedState.confirmSignInWithEmailMfaCode,
170169
isA<AuthenticatedState>(),
171170
emitsDone,
172171
]),

0 commit comments

Comments
 (0)