You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hardens a flaky e2e test: Dev Toolbar - Audits › can warn about perf issue for below the fold image in absolute container.
The audit gates highlight creation on the image's load event (apps/audit/index.ts awaits load so the above/below-the-fold position checks have accurate layout). The test clicked the audit button and immediately asserted toHaveCount(1) with the default 6s expect timeout. When the optimized image loads slowly (e.g. a contended CI runner), the highlight is not created in time and the assertion intermittently sees 0 highlights, failing every retry.
The test now waits for the image to finish loading before triggering the audit, so the assertion no longer races the image load. No production code changes.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This is a test-only fix for a flaky e2e test (below the fold dev-toolbar perf audit) that fails on unrelated CI runs across the repo. Merging it should reduce spurious CI failures for everyone working on the project.
cc @ematipico - could you take a look when you have a moment?
This file contains hidden or 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
pkg: astroRelated to the core `astro` package (scope)
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Hardens a flaky e2e test:
Dev Toolbar - Audits › can warn about perf issue for below the fold image in absolute container.The audit gates highlight creation on the image's
loadevent (apps/audit/index.tsawaitsloadso the above/below-the-fold position checks have accurate layout). The test clicked the audit button and immediately assertedtoHaveCount(1)with the default 6sexpecttimeout. When the optimized image loads slowly (e.g. a contended CI runner), the highlight is not created in time and the assertion intermittently sees 0 highlights, failing every retry.The test now waits for the image to finish loading before triggering the audit, so the assertion no longer races the image load. No production code changes.
This flaked (all 3 retries) on unrelated CI, e.g. https://github.com/withastro/astro/actions/runs/28129089505/job/83301140796
Testing
pnpm --filter astro exec playwright test dev-toolbar-audits.test.tsruns 11 passing, executed twice for stability.Docs
No docs changes; this is test-only. No changeset, since there are no published package changes.