-
Notifications
You must be signed in to change notification settings - Fork 823
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
Conversation
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. |
Code Coverage SummaryCoverage changed in 1 file.
Full summary · PHP report · JS report Coverage check overridden by
I don't care about code coverage for this PR
|
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' ], |
There was a problem hiding this comment.
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.
@@ -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/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was never used.
} ); | ||
|
||
test.beforeEach( async function ( { page } ) { | ||
test.beforeEach( async () => { |
There was a problem hiding this comment.
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
6890e54
to
3da2a49
Compare
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:
specs/critical-css
) - Boost: Re-enable Critical CSS and Concatenate E2E tests #44105specs/concatenate
) - Boost: Re-enable Critical CSS and Concatenate E2E tests #44105specs/base
) - Boost: Re-enable Base/Common E2E tests #44140specs/modules
) - This PRTest suites still disabled (to be addressed in separate PRs):
specs/page-cache
)specs/image-cdn
)specs/image-guide
)Jetpack product discussion
N/A
Does this pull request change what data or activity we track or use?
No
Other information:
Testing instructions:
From the
projects/plugins/boost/tests/e2e
directory:Via ngrok (Recommended, but requires a subscription)
Replace
$tunnel_url
with your actual ngrok URLInstall E2E test dependencies:
Start the Docker environment and tunnel:
Start your ngrok tunnel
ngrok http --url=$tunnel_url http://localhost:8889/
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)
Install E2E test dependencies:
Start the Docker environment and tunnel:
pnpm run env:up && pnpm run tunnel:up
Run the specific re-enabled test suites:
Expected behavior:
Verification steps:
Check that tests are running in CI:
Test stability: