Skip to content

Waiting for the network to be idle#256

Closed
ineiti wants to merge 1 commit intomainfrom
smallest_set
Closed

Waiting for the network to be idle#256
ineiti wants to merge 1 commit intomainfrom
smallest_set

Conversation

@ineiti
Copy link
Member

@ineiti ineiti commented Jan 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 20, 2026 15:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses test flakiness by adding network idle waiting to page navigation in end-to-end tests. The changes ensure that tests wait for all network activity to complete before proceeding with test assertions.

Changes:

  • Added { waitUntil: "networkidle" } option to page.goto() calls in beforeEach hooks
  • Applied changes only to test files that already have retry configurations due to flakiness
  • Consistent implementation across all affected test files

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
e2e/selectedProjects.spec.ts Added networkidle wait to both test describe blocks' beforeEach hooks to address chromium/webkit flakiness
e2e/searchbar.spec.ts Added networkidle wait to beforeEach hook to address URL update flakiness
e2e/infoicons.spec.ts Added networkidle wait to both test describe blocks' beforeEach hooks for consistent page loading

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This is the minimum amount of fixes I managed to have running playwright tests:
- use appropriate playwright waits when calling page.goto
- rewrite the filters for finding elements on the page
- fix the use of PLAYWRIGHT_TEST in SelectedProjects.vue
- let the carousel turn, so playwright fires on changes
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},
runtimeConfig: {
public: {
playwrightTest: process.env.PLAYWRIGHT_TEST == "1" || false
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comparison operator should use strict equality (===) instead of loose equality (==). Using loose equality can lead to unexpected type coercion behavior.

Suggested change
playwrightTest: process.env.PLAYWRIGHT_TEST == "1" || false
playwrightTest: process.env.PLAYWRIGHT_TEST === "1" || false

Copilot uses AI. Check for mistakes.
height: 500,
gap: 10,
autoplay: process.env.PLAYWRIGHT_TEST ? 0 : 4000, // disable auto-advancing the slides for e2e tests
autoplay: config.public.playwrightTest ? 1000 : 4000, // disable auto-advancing the slides for e2e tests
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "disable auto-advancing the slides for e2e tests", but the code sets autoplay to 1000ms (1 second) when playwrightTest is true. This doesn't disable autoplay, it actually enables it with a shorter interval. To disable autoplay, this should be 0, not 1000.

Suggested change
autoplay: config.public.playwrightTest ? 1000 : 4000, // disable auto-advancing the slides for e2e tests
autoplay: config.public.playwrightTest ? 0 : 4000, // disable auto-advancing the slides for e2e tests

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +59
const searchBox = page.getByRole("textbox", { name: "Search" }).filter({ visible: true }).first();
const text = "toto";
await searchBox.fill(text);
await expect(searchBox).toHaveValue(text);
// Wait for clear button to appear after debounced update
const clearButton = page.getByRole("button", { name: "Clear search" }).filter({ visible: true }).first();
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line "await expect(searchBox).toHaveValue(text);" was removed, which means the test no longer verifies that the search box actually contains the text before clicking the clear button. This verification step is important to ensure the test is in the correct state before attempting to clear.

Copilot uses AI. Check for mistakes.
@ineiti ineiti closed this Jan 20, 2026
@ineiti ineiti deleted the smallest_set branch January 20, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants