Repository navigation
Boost: fix the Overview refresh error test on trunk - #52399
Merged
Merged
Conversation
…ng in the refresh error test The header action is published from an effect, so it re-enables one render after the error notice appears. On a slow CI runner the second click landed while the button was still aria-disabled and was ignored; toBeEnabled() does not check aria-disabled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Boost plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
LiamSarsfield
marked this pull request as ready for review
September 16, 2026 17:39
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.
Follow-up to #52382
Proposed changes
aria-disabled="false". It used to checktoBeEnabled(). No product code changes.Cause: The Overview sends its header button to the page from an effect. After the error, the button re-enables one render after the "Refresh failed" notice appears. On a fast machine that render finishes before
findByTextreturns. On a slow CI runner, React's scheduler splits that work across tasks, so the test clicks while the button is stillaria-disabled. The@wordpress/uibutton ignores the click, and the notice stays.toBeEnabled()checks only thedisabledattribute, so it did not catch this. #52362, #52235 and #52381 do not touch this code.Reproduction: Before the fix, the file passed 5/5 locally and 3/3 with
--maxWorkers=1under full CPU load. It failed 3/3 with the CI error when a scratch copy added about 6 ms of synchronous work to one effect. At that point the button wasaria-disabled="true"and no request was sent. After the fix, the same scratch run passed 5/5, and no other test in the file failed under that slowdown.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
cd projects/plugins/boost && pnpm exec jest --config=tests/jest.config.cjs _inc/overview/overview.test.tsx