public async Task <ConfirmEmail> ClickConfirmLinkAsync() { var goToConfirm = await Client.GetAsync(_confirmLink.Href); var confirm = await ResponseAssert.IsHtmlDocumentAsync(goToConfirm); return(await ConfirmEmail.Create(_confirmLink, Client, Context)); }
internal static async Task <ConfirmEmail> ConfirmEmailAsync(IdentityEmail email, HttpClient client) { var emailBody = HtmlAssert.IsHtmlFragment(email.Body); var linkElement = HtmlAssert.HasElement("a", emailBody); var link = Assert.IsAssignableFrom <IHtmlAnchorElement>(linkElement); return(await ConfirmEmail.Create(link, client, new DefaultUIContext() .WithAuthenticatedUser() .WithExistingUser() .WithConfirmedEmail())); }