Skip to content
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

Update E2E NPM scripts #10276

Merged
merged 13 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/e2e-pw/run-log-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
id: first_run_e2e_pw_tests
# Use +e to trap errors when running E2E tests.
shell: /bin/bash +e {0}
run: npm run test:e2e-pw-ci
run: npm run test:e2e-ci
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
4 changes: 4 additions & 0 deletions changelog/dev-10240-update-npm-scripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Update E2E NPM scripts.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@
"test:e2e-up": "./tests/e2e/env/up.sh",
"test:e2e-cleanup": "./tests/e2e/env/cleanup.sh",
"test:e2e-reset": "npm run test:e2e-down && npm run test:e2e-cleanup",
"test:e2e": "NODE_CONFIG_DIR='tests/e2e/config' JEST_PUPPETEER_CONFIG='tests/e2e/config/jest-puppeteer-headless.config.js' wp-scripts test-e2e --config tests/e2e/config/jest.config.js",
"test:e2e-dev": "NODE_CONFIG_DIR='tests/e2e/config' JEST_PUPPETEER_CONFIG='tests/e2e/config/jest-puppeteer.config.js' wp-scripts test-e2e --config tests/e2e/config/jest.config.js --puppeteer-interactive",
"test:e2e": "./tests/e2e-pw/test-e2e-pw.sh",
"test:e2e-ci": "npx playwright test --config=tests/e2e-pw/playwright.config.ts --grep-invert @todo",
"test:e2e-ui": "./tests/e2e-pw/test-e2e-pw-ui.sh",
"test:e2e-performance": "NODE_CONFIG_DIR='tests/e2e/config' wp-scripts test-e2e --config tests/e2e/config/jest.performance.config.js",
"test:e2e-pw": "./tests/e2e-pw/test-e2e-pw.sh",
"test:e2e-pw-update-snapshots": "npm run test:e2e-pw -- --update-snapshots",
"test:e2e-pw-ui": "./tests/e2e-pw/test-e2e-pw-ui.sh",
"test:e2e-pw-ci": "npx playwright test --config=tests/e2e-pw/playwright.config.ts --grep-invert @todo",
"test:e2e-update-snapshots": "npm run test:e2e -- --update-snapshots",
"test:update-snapshots": "npm run test:js -- --updateSnapshot",
"test:php": "./bin/run-tests.sh",
"test:php-coverage": "./bin/check-test-coverage.sh",
Expand Down
11 changes: 5 additions & 6 deletions tests/e2e-pw/utils/merchant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ const expectSnackbarWithText = async (
expectedText: string,
timeout = 10000
) => {
await expect(
page.locator( '.components-snackbar__content', {
hasText: expectedText,
} )
).toBeVisible( {
timeout: timeout,
const snackbar = page.locator( '.components-snackbar__content', {
hasText: expectedText,
} );

await expect( snackbar ).toBeVisible( { timeout } );
await page.waitForTimeout( 2000 );
};

export const saveWooPaymentsSettings = async ( page: Page ) => {
Expand Down
Loading