-
Notifications
You must be signed in to change notification settings - Fork 165
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
Added RetryCustomConfirmationAsync #3468
Conversation
@@ -92,6 +92,8 @@ public static void RunBaasTestAsync(Func<Task> testFunc, int timeout = 30000) | |||
|
|||
public static string GetVerifiedUsername() => $"realm_tests_do_autoverify-{Guid.NewGuid()}"; | |||
|
|||
public static string GetUnconfirmedUsername() => $"realm_tests_do_not_confirm-{Guid.NewGuid()}@g.it"; |
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.
RetryCustomConfirmation
will fail if the input doesn't look like a proper email. We could add the same to GetVerifiedUsername
for consistency
{ | ||
let newVal = { | ||
'email': username, | ||
'token': token, |
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.
Saving the token and tokenId is not necessary now, but it could be useful if we want to write tests for ConfirmAsync
Pull Request Test Coverage Report for Build 6743724741
💛 - Coveralls |
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.
Looks good.
// At the same time we save the user email in a collection. | ||
await DefaultApp.EmailPasswordAuth.RegisterUserAsync(unconfirmedMail, SyncTestHelpers.DefaultPassword).Timeout(10_000, detail: "Failed to register user"); | ||
|
||
var ex3 = await TestHelpers.AssertThrows<AppException>(() => DefaultApp.LogInAsync(credentials)); |
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.
Not super important, but why is this ex3
rather than just ex
?
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.
Because before I had the sections in the opposite order and I forgot to rename the exceptions 😁
Fixes #3463
TODO