forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcc7575
commit abd4e09
Showing
10 changed files
with
102 additions
and
297 deletions.
There are no files selected for viewing
This file was deleted.
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,55 +22,48 @@ test.describe( | |
await openPage(url, page, browserName); | ||
}); | ||
|
||
test.skip('Footer open / close click', async ({ page }) => { | ||
const footerHeadingCompany = page.getByTestId( | ||
'footer-heading-company' | ||
); | ||
const footerListCompany = page.getByTestId('footer-list-company'); | ||
const footerHeadingResources = page.getByTestId( | ||
'footer-heading-resources' | ||
); | ||
const footerListResources = page.getByTestId( | ||
'footer-list-resources' | ||
); | ||
const footerHeadingSupport = page.getByTestId( | ||
'footer-heading-support' | ||
); | ||
const footerListSupport = page.getByTestId('footer-list-support'); | ||
const footerHeadingDevelopers = page.getByTestId( | ||
'footer-heading-developers' | ||
); | ||
const footerListDevelopers = page.getByTestId( | ||
'footer-list-developers' | ||
test('Footer newsletter submit success', async ({ page }) => { | ||
const form = page.getByTestId('newsletter-form'); | ||
const emailField = page.getByTestId('newsletter-email-input'); | ||
const countryField = page.getByTestId('newsletter-country-select'); | ||
const privacyCheckbox = page.getByTestId( | ||
'newsletter-privacy-checkbox' | ||
); | ||
const submitButton = page.getByTestId('newsletter-submit-button'); | ||
const thanksMessage = page.getByTestId('newsletter-thanks-message'); | ||
|
||
// expand form before running test | ||
await submitButton.click(); | ||
|
||
// Open and close Company section | ||
await expect(footerListCompany).not.toBeVisible(); | ||
await footerHeadingCompany.click(); | ||
await expect(footerListCompany).toBeVisible(); | ||
await footerHeadingCompany.click(); | ||
await expect(footerListCompany).not.toBeVisible(); | ||
await expect(thanksMessage).not.toBeVisible(); | ||
await emailField.fill('[email protected]'); | ||
await countryField.selectOption('us'); | ||
await privacyCheckbox.click(); | ||
await submitButton.click(); | ||
await expect(form).not.toBeVisible(); | ||
await expect(thanksMessage).toBeVisible(); | ||
}); | ||
|
||
// Open and close Resources section | ||
await expect(footerListResources).not.toBeVisible(); | ||
await footerHeadingResources.click(); | ||
await expect(footerListResources).toBeVisible(); | ||
await footerHeadingResources.click(); | ||
await expect(footerListResources).not.toBeVisible(); | ||
test('Footer newsletter submit failure', async ({ page }) => { | ||
const emailField = page.getByTestId('newsletter-email-input'); | ||
const countryField = page.getByTestId('newsletter-country-select'); | ||
const privacyCheckbox = page.getByTestId( | ||
'newsletter-privacy-checkbox' | ||
); | ||
const submitButton = page.getByTestId('newsletter-submit-button'); | ||
const thanksMessage = page.getByTestId('newsletter-thanks-message'); | ||
const errorMessage = page.getByTestId('newsletter-error-message'); | ||
|
||
// Open and close Support section | ||
await expect(footerListSupport).not.toBeVisible(); | ||
await footerHeadingSupport.click(); | ||
await expect(footerListSupport).toBeVisible(); | ||
await footerHeadingSupport.click(); | ||
await expect(footerListSupport).not.toBeVisible(); | ||
// expand form before running test | ||
await page.getByTestId('newsletter-submit-button').click(); | ||
|
||
// Open and close Developers section | ||
await expect(footerListDevelopers).not.toBeVisible(); | ||
await footerHeadingDevelopers.click(); | ||
await expect(footerListDevelopers).toBeVisible(); | ||
await footerHeadingDevelopers.click(); | ||
await expect(footerListDevelopers).not.toBeVisible(); | ||
await expect(errorMessage).not.toBeVisible(); | ||
await emailField.fill('[email protected]'); | ||
await countryField.selectOption('us'); | ||
await privacyCheckbox.click(); | ||
await submitButton.click(); | ||
await expect(errorMessage).toBeVisible(); | ||
await expect(thanksMessage).not.toBeVisible(); | ||
}); | ||
|
||
test('Footer language change', async ({ page }) => { | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.