Repository navigation
test(web): bound testing-library async waits at 5 s - #24903
Merged
Merged
Conversation
findBy and waitFor default to 1 s. Under host load the first render of the settings and developer pages can take longer, so three tests failed with element-not-found on a rendered page rather than on wrong content (DevelopersKeys, SettingsDailySummary, SettingsSubscriptionClarity). Raise the async wait to 5 s in the shared setup. The per-test timeout stays at 15 s.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by David
Summary
Raises testing-library's async wait (
asyncUtilTimeout) from the 1 s default to 5 s in the shared web test setup. Test-only change, four lines, no product code and no UI change.Why
Three web tests fail intermittently in the full vitest run, and each failure is
TestingLibraryElementErrorfrom afindBythat expired, not an assertion about wrong content:DevelopersKeys.test.tsx"shows genuine empty lists":findByText('No API keys created yet')SettingsDailySummary.test.tsx"does not save the settings when the load failed":findByText('Daily Summary')SettingsSubscriptionClarity.test.tsx"shows Plus with its finite meter and records a real checkout selection":findByRole('heading', { name: 'Plus' })vitest.config.mtssetstestTimeoutto 15 s, which none of them hit.vitest.setup.tsdid not override testing-library's 1 s async default, so a first render slower than 1 s fails under host load. The failing set changed from run to run, which fits a load-dependent timing race.Verification
bin/omi-heavy, same commands as the pre-push hook (bun test scripts/moonshine-smoke.test.ts && vitest run --config vitest.config.mts), at normal MacBook load:Scope
Only
web/app/vitest.setup.ts. The per-test timeout stays at 15 s. The fix hides nothing and changes no assertion. It bounds an async wait; it does not skip or retry tests.Ownership
Owner: the home-overlap lane. This PR unblocks the pre-push web gate for
lane/pipeline-approved(#24866).🤖 Generated with Claude Code