Skip to content
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

test: confirm sign in tests #1176

Conversation

Jordan-Nelson
Copy link
Member

Issue #, if available:

Description of changes:

  • add confirm sign in tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Jordan-Nelson Jordan-Nelson requested a review from a team as a code owner December 3, 2021 19:59
@@ -105,6 +107,17 @@ abstract class AuthenticatorPage {
expect(expectCombinationNotFound, findsOneWidget);
}

/// Then I see Invalid verification code
Future<void> expectInvalidVerificationCode() async {
if (Platform.isAndroid) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It surprised me that the messages were different on iOS and Android. Seems like this is a bug. Not specific to the authenticator though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final Stream<GraphQLResponse<String>> operation = Amplify.API.subscribe(
GraphQLRequest<String>(document: subscriptionDocument),
onEstablished: () {
subscriptionCompleter.complete();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you tested and this worked? When I tried this approach it hung.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It hung some (most?) of the time but did seem to work some of the time. I have await subscriptionCompleter.future commented out and instead have await Future.delayed(const Duration(seconds: 1), () {}); as a temp solution.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alrighty, thanks

Copy link
Member

@haverchuck haverchuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but otherwise LGTM

@haverchuck haverchuck requested a review from dnys1 December 3, 2021 20:23
@Jordan-Nelson Jordan-Nelson merged commit 8f9e15a into aws-amplify:amplify-authenticator Dec 3, 2021
@Jordan-Nelson Jordan-Nelson deleted the authenticator/confirm-sign-in branch December 3, 2021 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants