Skip to content

Fix flaky SharedPage not-found title test - #205

Merged
Programcode merged 1 commit into
mainfrom
fix/flaky-sharedpage-title-test
Oct 23, 2026
Merged

Programcode merged 1 commit into
mainfrom
fix/flaky-sharedpage-title-test

Conversation

@Programcode

Copy link
Copy Markdown
Owner

SharedPage.test.tsx asserted document.title (and the robots meta) right after findByRole found the not-found heading. That heading commits before the passive effect that sets them runs, so the test failed intermittently (reproduced: 1 failure in 15 runs on main 4338727).

Change (test only): wait for the title and robots meta with waitFor. The component is correct: setting the title in an effect is the expected pattern.

Checks: the test file passed 20/20 runs in a row; lint, typecheck and unit tests (74 files) pass. Full verify skipped (test-only change; the shared stack lock was held by another job).

The not-found heading commits before the passive effect that sets document.title and the robots meta, so asserting right after findByRole failed about 1 run in 12-15. Wait for both. Test-only; the component is correct.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 00:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 4338727 and 6e48963.

📒 Files selected for processing: 1
  • src/test/pages/SharedPage.test.tsx
+-----------------------------+
| Lint today, shine tomorrow. |
+-----------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode
Programcode merged commit 508f243 into main Oct 23, 2026
2 of 9 checks passed
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