-
Notifications
You must be signed in to change notification settings - Fork 918
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
a1a0ba7
commit a16c796
Showing
4 changed files
with
8 additions
and
11 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
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
const { test, expect } = require('@playwright/test'); | ||
const openPage = require('../scripts/open-page'); | ||
const url = '/en-US/'; | ||
const url = '/de/'; | ||
|
||
test.describe( | ||
`${url} page`, | ||
|
@@ -23,6 +23,7 @@ test.describe( | |
test('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' | ||
); | ||
|
@@ -34,6 +35,7 @@ test.describe( | |
|
||
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(); | ||
|
@@ -42,6 +44,7 @@ test.describe( | |
|
||
test('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' | ||
); | ||
|
@@ -54,6 +57,7 @@ test.describe( | |
|
||
await expect(errorMessage).not.toBeVisible(); | ||
await emailField.fill('[email protected]'); | ||
await countryField.selectOption('us'); | ||
await privacyCheckbox.click(); | ||
await submitButton.click(); | ||
await expect(errorMessage).toBeVisible(); | ||
|