-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update npm dependencies, deprecated test functions, and add major ver…
…sion dependabot ignore (#1535)
- Loading branch information
1 parent
198db69
commit dbe149d
Showing
113 changed files
with
5,413 additions
and
3,888 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import ThankYouPage from "../base_pages/thank-you.page"; | |
import ConfirmationEmailPage from "../base_pages/confirmation-email.page"; | ||
import ConfirmationEmailSentPage from "../base_pages/confirmation-email-sent.page"; | ||
import ConfirmEmailPage from "../base_pages/confirm-email.page"; | ||
import { click } from "../helpers"; | ||
import { click, verifyUrlContains } from "../helpers"; | ||
|
||
const errorPanel = '[data-ga="error"]'; | ||
|
||
|
@@ -17,58 +17,58 @@ describe("Email confirmation", () => { | |
it("When I complete the survey and am on the thank you page, Then there is option to enter an email address", async () => { | ||
await click(SubmitPage.submit()); | ||
await click(SubmitPage.submit()); | ||
await expect(browser).toHaveUrlContaining(ThankYouPage.pageName); | ||
await verifyUrlContains(ThankYouPage.pageName); | ||
await expect(await $(ThankYouPage.email()).isExisting()).toBe(true); | ||
}); | ||
|
||
it("When I submit the form without providing an email address, Then I get an error message", async () => { | ||
await click(ThankYouPage.submit()); | ||
await expect(browser).toHaveUrlContaining(ThankYouPage.pageName); | ||
await verifyUrlContains(ThankYouPage.pageName); | ||
await expect(await $(errorPanel).isExisting()).toBe(true); | ||
await expect(await $(errorPanel).getText()).toBe("Enter an email address"); | ||
}); | ||
|
||
it("When I submit the form without providing a correctly formatted email address, Then I get an error message", async () => { | ||
await $(ThankYouPage.email()).setValue("incorrect-format"); | ||
await click(ThankYouPage.submit()); | ||
await expect(browser).toHaveUrlContaining(ThankYouPage.pageName); | ||
await verifyUrlContains(ThankYouPage.pageName); | ||
await expect(await $(errorPanel).isExisting()).toBe(true); | ||
await expect(await $(errorPanel).getText()).toBe("Enter an email address in a valid format, for example [email protected]"); | ||
}); | ||
|
||
it("When I submit the form with a valid email address, Then I go to the confirm email page", async () => { | ||
await $(ThankYouPage.email()).setValue("[email protected]"); | ||
await click(ThankYouPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/confirm"); | ||
await verifyUrlContains("confirmation-email/confirm"); | ||
await expect(await $(ConfirmEmailPage.questionTitle()).getText()).toBe("Is this email address correct?"); | ||
}); | ||
|
||
it("When I submit the confirm email page without providing an answer, Then I get an error message", async () => { | ||
await click(ConfirmEmailPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/confirm"); | ||
await verifyUrlContains("confirmation-email/confirm"); | ||
await expect(await $(ConfirmEmailPage.errorPanel()).isExisting()).toBe(true); | ||
await expect(await $(ConfirmEmailPage.errorPanel()).getText()).toContain("Select an answer"); | ||
}); | ||
|
||
it("When I answer 'Yes' and submit the confirm email page, Then I go to email sent page", async () => { | ||
await $(ConfirmEmailPage.yes()).click(); | ||
await click(ConfirmEmailPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/sent"); | ||
await verifyUrlContains("confirmation-email/sent"); | ||
await expect(await $(ConfirmationEmailSentPage.confirmationText()).getText()).toBe("A confirmation email has been sent to [email protected]"); | ||
}); | ||
|
||
it("When I go to the confirmation email page and submit without providing an email address, Then I get an error message", async () => { | ||
await $(ConfirmationEmailSentPage.sendAnotherEmail()).click(); | ||
await click(ConfirmationEmailPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/send"); | ||
await verifyUrlContains("confirmation-email/send"); | ||
await expect(await $(ConfirmationEmailPage.errorPanel()).isExisting()).toBe(true); | ||
await expect(await $(ConfirmationEmailPage.errorPanel()).getText()).toBe("Enter an email address"); | ||
}); | ||
|
||
it("When I submit the form without providing a correctly formatted email address, Then I get an error message", async () => { | ||
await $(ConfirmationEmailPage.email()).setValue("incorrect-format"); | ||
await click(ConfirmationEmailPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/send"); | ||
await verifyUrlContains("confirmation-email/send"); | ||
await expect(await $(ConfirmationEmailPage.errorPanel()).isExisting()).toBe(true); | ||
await expect(await $(ConfirmationEmailPage.errorPanel()).getText()).toBe("Enter an email address in a valid format, for example [email protected]"); | ||
}); | ||
|
@@ -78,7 +78,7 @@ describe("Email confirmation", () => { | |
await click(ConfirmationEmailPage.submit()); | ||
await $(ConfirmEmailPage.yes()).click(); | ||
await click(ConfirmEmailPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/sent"); | ||
await verifyUrlContains("confirmation-email/sent"); | ||
await expect(await $(ConfirmationEmailSentPage.confirmationText()).getText()).toBe("A confirmation email has been sent to [email protected]"); | ||
}); | ||
}); | ||
|
@@ -93,7 +93,7 @@ describe("Email confirmation", () => { | |
await click(ThankYouPage.submit()); | ||
await $(ConfirmEmailPage.no()).click(); | ||
await click(ConfirmEmailPage.submit()); | ||
await expect(browser).toHaveUrlContaining("confirmation-email/send"); | ||
await verifyUrlContains("confirmation-email/send"); | ||
await expect(await $(ConfirmationEmailPage.email()).getValue()).toBe("[email protected]"); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.