-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Convert directories in test/ to workspaces #74684
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
Changes from all commits
1cc0a48
b7cb790
8074321
a665961
880a07c
d25c0ba
eed7b08
16d933c
6aafa82
a44c4d5
37cc023
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,17 +55,15 @@ jobs: | |
| - name: Run the tests | ||
| env: | ||
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
| SHARD_PART: ${{ matrix.part }} | ||
| SHARD_TOTAL: ${{ matrix.totalParts }} | ||
| run: | | ||
| xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e -- --shard="${SHARD_PART}/${SHARD_TOTAL}" | ||
| xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run --workspace @wordpress/e2e-tests-playwright test:e2e -- --shard=${{ matrix.part }}/${{ matrix.totalParts }} | ||
|
|
||
| - name: Archive debug artifacts (screenshots, traces) | ||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: failures-artifacts--${{ matrix.part }} | ||
| path: artifacts/test-results | ||
| path: test/e2e/artifacts/test-results | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did the paths change? Running the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The The Playwright base config in process.env.WP_ARTIFACTS_PATH ??= path.join( process.cwd(), 'artifacts' );
outputDir: path.join( process.env.WP_ARTIFACTS_PATH, 'test-results' ),
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this change required for workspaces?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, see #74684 (comment) |
||
| if-no-files-found: ignore | ||
|
|
||
| - name: Archive blob reports (HTML) | ||
|
|
@@ -81,7 +79,7 @@ jobs: | |
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: flaky-tests-report--${{ matrix.part }} | ||
| path: flaky-tests | ||
| path: test/e2e/flaky-tests | ||
| if-no-files-found: ignore | ||
|
|
||
| merge-artifacts: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "name": "@wordpress/e2e-tests-playwright", | ||
| "version": "0.0.0", | ||
| "description": "End-to-end tests for WordPress Gutenberg.", | ||
| "private": true, | ||
| "author": "The WordPress Contributors", | ||
| "license": "GPL-2.0-or-later", | ||
| "keywords": [ | ||
| "wordpress", | ||
| "gutenberg", | ||
| "e2e", | ||
| "playwright" | ||
| ], | ||
| "homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/test/e2e/README.md", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/WordPress/gutenberg.git", | ||
| "directory": "test/e2e" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/WordPress/gutenberg/issues" | ||
| }, | ||
| "devDependencies": { | ||
| "@playwright/test": "^1.58.2", | ||
| "@wordpress/e2e-test-utils-playwright": "file:../../packages/e2e-test-utils-playwright", | ||
| "@wordpress/scripts": "file:../../packages/scripts", | ||
| "filenamify": "^4.2.0" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "scripts": { | ||
| "test:e2e": "wp-scripts test-playwright --config playwright.config.ts", | ||
| "test:e2e:debug": "wp-scripts test-playwright --config playwright.config.ts --ui" | ||
| } | ||
| } |

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.
Here we could continue to run
npm run test:e2e, because the top-level script still exists, it just forwards the execution to the workspace script. Is that right?I'm not suggesting that we change this back, just asking to verify my understanding.
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.
Yes, we could.