-
Notifications
You must be signed in to change notification settings - Fork 247
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
test: confirm sign in tests #1176
Conversation
@@ -105,6 +107,17 @@ abstract class AuthenticatorPage { | |||
expect(expectCombinationNotFound, findsOneWidget); | |||
} | |||
|
|||
/// Then I see Invalid verification code | |||
Future<void> expectInvalidVerificationCode() async { | |||
if (Platform.isAndroid) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is where the message on Android is coming from - https://github.com/aws-amplify/amplify-android/blob/main/core/src/main/java/com/amplifyframework/auth/AuthException.java#L317
final Stream<GraphQLResponse<String>> operation = Amplify.API.subscribe( | ||
GraphQLRequest<String>(document: subscriptionDocument), | ||
onEstablished: () { | ||
subscriptionCompleter.complete(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty, thanks
There was a problem hiding this 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
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.