Skip to content

Commit 13087bf

Browse files
committed
make smoke tests more reliable
1 parent cf777db commit 13087bf

File tree

12 files changed

+24
-0
lines changed

12 files changed

+24
-0
lines changed

exercises/01.init/01.problem.static/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/01.init/01.solution.static/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/02.server-components/01.problem.rsc/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/02.server-components/01.solution.rsc/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/02.server-components/02.problem.async-components/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/02.server-components/02.solution.async-components/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/02.server-components/04.problem.server-context/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/02.server-components/04.solution.server-context/tests/solution.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/03.client-components/01.problem.loader/tests/smoke.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

exercises/03.client-components/01.solution.loader/tests/smoke.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ test('should display the home page and perform search', async ({ page }) => {
1616
// Verify URL change with search params
1717
await expect(page).toHaveURL('/?search=hopper')
1818

19+
await page.waitForLoadState('networkidle')
20+
1921
// Verify filtered results
2022
const shipLinks = page
2123
.getByRole('list')

0 commit comments

Comments
 (0)