Skip to content

Boost: fix the Overview refresh error test on trunk - #52399

Merged
LiamSarsfield merged 1 commit into
trunkfrom
fm/boost-trunk-red-overview-test
Sep 16, 2026
Merged

LiamSarsfield merged 1 commit into
trunkfrom
fm/boost-trunk-red-overview-test

Conversation

@LiamSarsfield

Copy link
Copy Markdown
Contributor

Follow-up to #52382

Proposed changes

  • Fix the test "retains loaded scores and Run speed test alongside a subsequent score error", which has made trunk JS tests fail since Boost: move the speed test to the Overview header #52382. Before the second "Run speed test" click, the test now waits until the header button has aria-disabled="false". It used to check toBeEnabled(). 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 findByText returns. On a slow CI runner, React's scheduler splits that work across tasks, so the test clicks while the button is still aria-disabled. The @wordpress/ui button ignores the click, and the notice stays. toBeEnabled() checks only the disabled attribute, 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=1 under 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 was aria-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

  • Trunk failure: Tests run 35121999946.

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
  • Check that CI JS tests pass.

…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>
@github-actions github-actions Bot added [Plugin] Boost A feature to speed up the site and improve performance. [Status] In Progress labels Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Sep 16, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit 08a3034, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 08a3034 is available.

Full summary · PHP report · JS report

@LiamSarsfield LiamSarsfield added [Type] Bug and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Sep 16, 2026
@LiamSarsfield
LiamSarsfield marked this pull request as ready for review September 16, 2026 17:39
@LiamSarsfield
LiamSarsfield requested a review from a team as a code owner September 16, 2026 17:39
@LiamSarsfield
LiamSarsfield merged commit 192ea10 into trunk Sep 16, 2026
91 of 92 checks passed
@LiamSarsfield
LiamSarsfield deleted the fm/boost-trunk-red-overview-test branch September 16, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Boost A feature to speed up the site and improve performance. [Type] Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant