Skip to content

Boost: Re-enable Module E2E tests #44141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 9, 2025

Conversation

LiamSarsfield
Copy link
Contributor

@LiamSarsfield LiamSarsfield commented Jun 30, 2025

Addresses HOG-193: Enable Module E2E tests

Proposed changes:

This PR re-enables projects/plugins/boost/tests/e2e/specs/modules tests e2e test suite that was temporarily disabled in commit 0eb34d93ca7522549dcec7ea35c09d4f39ef5406 due to flakiness:

Re-enabled test suites:

Test suites still disabled (to be addressed in separate PRs):

  • Jetpack Boost - Page Cache (specs/page-cache)
  • Jetpack Boost - Image CDN (specs/image-cdn)
  • Jetpack Boost - Image Guide (specs/image-guide)

Jetpack product discussion

N/A

Does this pull request change what data or activity we track or use?

No

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Testing instructions:

From the projects/plugins/boost/tests/e2e directory:

Via ngrok (Recommended, but requires a subscription)

Replace $tunnel_url with your actual ngrok URL

  1. Install E2E test dependencies:

    pnpm install
  2. Start the Docker environment and tunnel:

    pnpm run env:up && TUNNEL_URL=$tunnel_url pnpm run tunnel:up
  3. Start your ngrok tunnel

    ngrok http --url=$tunnel_url http://localhost:8889/
  4. Run the specific re-enabled test suites:

     TUNNEL_URL=$tunnel_url pnpm run test:run specs/modules

Via localtunnel (Not recommended as it may be slow)

  1. Install E2E test dependencies:

    pnpm install
  2. Start the Docker environment and tunnel:

    pnpm run env:up && pnpm run tunnel:up
  3. Run the specific re-enabled test suites:

    pnpm run test:run specs/modules

Expected behavior:

  • All Common/Base tests should pass without skipping or timeout errors
  • Tests should pass consistently when run multiple times

Verification steps:

  1. Check that tests are running in CI:

    • The re-enabled test suites should appear in the E2E test matrix
    • CI should execute "Jetpack Boost - Modules"
  2. Test stability:

    • Run each test suite 3-5 times to ensure consistency
    • No intermittent failures or timing-related issues should occur

@github-actions github-actions bot added [Plugin] Boost A feature to speed up the site and improve performance. [Status] In Progress [Tests] Includes Tests Actions GitHub actions used to automate some of the work around releases and repository management E2E Tests labels Jun 30, 2025
Copy link
Contributor

github-actions bot commented Jun 30, 2025

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 a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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 Jun 30, 2025
@LiamSarsfield LiamSarsfield requested review from kraftbj, dilirity and a team June 30, 2025 17:30
@LiamSarsfield LiamSarsfield removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 30, 2025
Copy link

jp-launch-control bot commented Jun 30, 2025

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/boost/app/assets/src/js/features/speed-score/speed-score.tsx 0/43 (0.00%) 0.00% 4 💔

Full summary · PHP report · JS report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

import { test, expect } from '_jetpack-e2e-commons/fixtures/base-test.js';
import playwrightConfig from '_jetpack-e2e-commons/playwright.config.mjs';
import { boostPrerequisitesBuilder } from '../../lib/env/prerequisites.js';
import { JetpackBoostPage } from '../../lib/pages/index.js';

const modules = [
// ['MODULE_NAME', 'DEFAULT STATE'],
[ 'critical_css', 'disabled' ],
[ 'critical_css', 'enabled' ],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be enabled. We now enable local Critical CSS by default when the user selects a free plan.

@LiamSarsfield LiamSarsfield marked this pull request as ready for review July 1, 2025 19:57
@LiamSarsfield LiamSarsfield marked this pull request as draft July 1, 2025 20:30
Base automatically changed from fix/boost/common-e2e-tests-hog-192 to trunk July 2, 2025 13:17
@LiamSarsfield LiamSarsfield added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Jul 2, 2025
@@ -3,7 +3,6 @@ import WpPage from '_jetpack-e2e-commons/pages/wp-page.js';

const apiEndpointsRegex = {
'modules-state': /jetpack-boost-ds\/modules-state\/set/,
connection: /jetpack-boost\/v1\/connection/,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was never used.

@github-actions github-actions bot added the Docker label Jul 7, 2025
@LiamSarsfield LiamSarsfield changed the base branch from trunk to update/boost/e2e/mock-unrelated-testing-hog-200 July 7, 2025 11:22
} );

test.beforeEach( async function ( { page } ) {
test.beforeEach( async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This beforeEach simply just visits the Boost page, the fact that this times out tells me there is a timeout issue with localtunnel, a retry resolved this issue.
specs/modules/speed-score.test.js:26:2 › Speed Score feature › The Speed Score section should display a mobile and desktop speed score greater than zero Test timeout of 300000ms exceeded while running "beforeEach" hook. 20 | } ); 21 | > 22 | test.beforeEach( async () => { | ^ 23 | jetpackBoostPage = await JetpackBoostPage.visit( page ); 24 | } ); 25 | at /home/runner/work/jetpack/jetpack/projects/plugins/boost/tests/e2e/specs/modules/speed-score.test.js:22:7

@LiamSarsfield LiamSarsfield marked this pull request as ready for review July 7, 2025 13:26
Base automatically changed from update/boost/e2e/mock-unrelated-testing-hog-200 to trunk July 7, 2025 20:40
@LiamSarsfield LiamSarsfield force-pushed the fix/boost/modules-e2e-tests-hog-193 branch from 6890e54 to 3da2a49 Compare July 8, 2025 10:57
@LiamSarsfield LiamSarsfield merged commit f5f4521 into trunk Jul 9, 2025
68 checks passed
@LiamSarsfield LiamSarsfield deleted the fix/boost/modules-e2e-tests-hog-193 branch July 9, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions GitHub actions used to automate some of the work around releases and repository management Docker E2E Tests I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Plugin] Boost A feature to speed up the site and improve performance. [Tests] Includes Tests [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants