Skip to content

Commit 887f8e7

Browse files
janbrasnastephaniehobson
authored andcommitted
Try eliminating some flakiness in Playwright welcome/* specs (#16777)
* Add more steps to firefox-welcome-6 test spec * Update firefox-welcome-4 test spec for consistency
1 parent dc85f21 commit 887f8e7

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

tests/playwright/specs/products/firefox/welcome/firefox-welcome-4.spec.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
const { test, expect } = require('@playwright/test');
1010
const openPage = require('../../../../scripts/open-page');
11-
const url = '/firefox/welcome/4/';
11+
const url = 'firefox/welcome/4';
1212

1313
test.describe(
1414
`${url} page`,
1515
{
16-
tag: ['@firefox', '@wfc-redirect']
16+
tag: '@firefox'
1717
},
1818
() => {
1919
test('Send to device form success', async ({ page, browserName }) => {
@@ -22,7 +22,7 @@ test.describe(
2222
'Page shown to Firefox browsers only'
2323
);
2424

25-
await openPage('/en-US/' + url, page, browserName);
25+
await openPage(`/en-US/${url}/`, page, browserName);
2626

2727
const qrCode = page.getByTestId('firefox-qr-code');
2828
const emailField = page.getByTestId(
@@ -37,6 +37,7 @@ test.describe(
3737

3838
await expect(qrCode).not.toBeVisible();
3939
await expect(thanksMessage).not.toBeVisible();
40+
await expect(submitButton).toBeVisible();
4041
await emailField.fill('[email protected]');
4142
await submitButton.click();
4243
await expect(submitButton).not.toBeVisible();
@@ -49,7 +50,7 @@ test.describe(
4950
'Page shown to Firefox browsers only'
5051
);
5152

52-
await openPage('/en-US/' + url, page, browserName);
53+
await openPage(`/en-US/${url}/`, page, browserName);
5354

5455
const qrCode = page.getByTestId('firefox-qr-code');
5556
const emailField = page.getByTestId(
@@ -62,6 +63,7 @@ test.describe(
6263

6364
await expect(qrCode).not.toBeVisible();
6465
await expect(errorMessage).not.toBeVisible();
66+
await expect(submitButton).toBeVisible();
6567
await emailField.fill('[email protected]');
6668
await submitButton.click();
6769
await expect(errorMessage).toBeVisible();
@@ -73,7 +75,7 @@ test.describe(
7375
'Page shown to Firefox browsers only'
7476
);
7577

76-
await openPage('/sv-SE/' + url, page, browserName);
78+
await openPage(`/fy-NL/${url}/`, page, browserName);
7779

7880
const qrCode = page.getByTestId('firefox-qr-code');
7981
const emailField = page.getByTestId(

tests/playwright/specs/products/firefox/welcome/firefox-welcome-6.spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
const { test, expect } = require('@playwright/test');
1010
const openPage = require('../../../../scripts/open-page');
11-
const url = '/firefox/welcome/6/';
11+
const url = 'firefox/welcome/6';
1212

1313
test.describe(
1414
`${url} page`,
1515
{
16-
tag: ['@firefox', '@wfc-redirect']
16+
tag: '@firefox'
1717
},
1818
() => {
19-
test('Send set as default button displayed', async ({
19+
test('Set as default button displayed', async ({
2020
page,
2121
browserName
2222
}) => {
@@ -55,6 +55,7 @@ test.describe(
5555
await getAppButton.click();
5656
await expect(qrCode).not.toBeVisible();
5757
await expect(thanksMessage).not.toBeVisible();
58+
await expect(submitButton).toBeVisible();
5859
await emailField.fill('[email protected]');
5960
await submitButton.click();
6061
await expect(submitButton).not.toBeVisible();
@@ -82,6 +83,7 @@ test.describe(
8283
await getAppButton.click();
8384
await expect(qrCode).not.toBeVisible();
8485
await expect(errorMessage).not.toBeVisible();
86+
await expect(submitButton).toBeVisible();
8587
await emailField.fill('[email protected]');
8688
await submitButton.click();
8789
await expect(errorMessage).toBeVisible();
@@ -93,7 +95,7 @@ test.describe(
9395
'Page shown to Firefox browsers only'
9496
);
9597

96-
await openPage(`/it/${url}/?default=true`, page, browserName);
98+
await openPage(`/fy-NL/${url}/?default=true`, page, browserName);
9799

98100
const getAppButton = page.getByTestId('button-firefox-get-app');
99101
const qrCode = page.getByTestId('firefox-qr-code');

0 commit comments

Comments
 (0)