Skip to content

test(e2e): drop waitForLoadState('networkidle') from helpers#7784

Closed
talissoncosta wants to merge 1 commit into
mainfrom
fix/e2e-remove-networkidle
Closed

test(e2e): drop waitForLoadState('networkidle') from helpers#7784
talissoncosta wants to merge 1 commit into
mainfrom
fix/e2e-remove-networkidle

Conversation

@talissoncosta

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Another intermittent E2E failure on the production deploy gate, distinct from the boot deadlock (#7776) and the permission write-race (#7782). Here the app is fully booted and on the right page, but page.waitForLoadState('networkidle') times out after 20s.

The dashboard loads HubSpot, LinkedIn, Google Ads and Chargebee scripts that fire tracking pixels and polling indefinitely, so the network never goes idle for 500ms and networkidle can't resolve regardless of whether the page is ready. Playwright explicitly discourages networkidle for this reason.

All four uses in the helpers (gotoTraits, the role-assignment helper, createEnvironment, createTag) were immediately followed by a concrete element wait — the real readiness signal — so the networkidle calls are redundant as well as flaky. Removed all four.

How did you test this code?

Observed the timeout in two captured failures (gotoTraits line 231 in environment-permission-test, and createTag line 915 in flag-tests), both with a fully-rendered page in the snapshot. Confirmed each removed call is followed by a deterministic waitForElementVisible/waitFor that already gates readiness.

The dashboard loads HubSpot, LinkedIn, Google Ads and Chargebee
trackers that fire pixels/polling indefinitely, so 'networkidle' never
settles and times out after 20s even though the page is ready
(observed in gotoTraits and createTag). Playwright discourages
networkidle for this reason. Each call was immediately followed by a
concrete element wait, which is the real readiness signal, so the
networkidle calls are redundant as well as flaky.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@talissoncosta talissoncosta requested a review from a team as a code owner June 15, 2026 12:25
@talissoncosta talissoncosta requested review from kyle-ssg and removed request for a team June 15, 2026 12:25
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jun 15, 2026 12:25pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jun 15, 2026 12:25pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Jun 15, 2026 12:25pm

Request Review

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Jun 15, 2026
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7784 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7784 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7784 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7784 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7784 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7784 Finished ✅ Results

@talissoncosta

Copy link
Copy Markdown
Contributor Author

Superseded by #7785, which consolidates the E2E flakiness fixes into one branch.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.8 seconds
commit  a8fa256
info  🔄 Run: #17499 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.9 seconds
commit  a8fa256
info  🔄 Run: #17499 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40 seconds
commit  a8fa256
info  🔄 Run: #17499 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  51.9 seconds
commit  a8fa256
info  🔄 Run: #17499 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants