Skip to content

Commit 5a123f7

Browse files
aduthmanzoorwanijkMamaduka
authored
Testing: Remove e2e-test-utils package and deprecated test configuration (#72880)
* Testing: Remove e2e-test-utils package and deprecated test configuration * Remove unused dependency from e2e-test-utils-playwright * Remove lockfile reference to e2e-test-utils Co-authored-by: aduth <[email protected]> Co-authored-by: manzoorwanijk <[email protected]> Co-authored-by: Mamaduka <[email protected]>
1 parent b4ecfd4 commit 5a123f7

File tree

114 files changed

+20
-5212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+20
-5212
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
/packages/create-block-tutorial-template @ryanwelcher
6767
/packages/dependency-extraction-webpack-plugin
6868
/packages/docgen
69-
/packages/e2e-test-utils @ntwb @nerrad @ajitbohra
7069
/packages/e2e-tests @ntwb @nerrad @ajitbohra
7170
/packages/e2e-test-utils-playwright @kevin940726
7271
/packages/eslint-plugin @ntwb @nerrad @ajitbohra

docs/contributors/code/e2e/README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
This living document serves to prescribe instructions and best practices for writing end-to-end (E2E) tests with Playwright in the Gutenberg project.
44

5-
<div class="callout callout-info">
6-
7-
See the dedicated guide if you're working with the previous Jest + Puppeteer framework. See the <a href="https://github.com/WordPress/gutenberg/tree/HEAD/docs/contributors/code/e2e/migration.md">migration guide</a> if you're migrating tests from Jest + Puppeteer.
8-
</div>
9-
10-
115
## Running tests
126

137
```bash
@@ -69,9 +63,9 @@ See the [official documentation](https://playwright.dev/docs/locators) for more
6963

7064
To encourage better practices for querying elements, selectors are [strict](https://playwright.dev/docs/api/class-browser#browser-new-page-option-strict-selectors) by default, meaning that it will throw an error if the query returns more than one element.
7165

72-
### Don't overload test-utils, inline simple utils
66+
### Inline simple utility helper function
7367

74-
`e2e-test-utils` are too bloated with too many utils. Most of them are simple enough to be inlined directly in tests. With the help of accessible selectors, simple utils are easier to write now. For utils that only take place on a certain page, use Page Object Model instead (with an exception of clearing states with `requestUtils` which are better placed in `e2e-test-utils`). Otherwise, only create an util if the action is complex and repetitive enough.
68+
Most utility functions are simple enough to be inlined directly in tests. With the help of accessible selectors, simple utils are easier to write now. For utils that only take place on a certain page, use Page Object Model instead. Otherwise, only create an util if the action is complex and repetitive enough.
7569

7670
### Favor Page Object Model over utils
7771

docs/contributors/code/e2e/migration.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/manifest.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,12 +1649,6 @@
16491649
"markdown_source": "../packages/e2e-test-utils-playwright/README.md",
16501650
"parent": "packages"
16511651
},
1652-
{
1653-
"title": "@wordpress/e2e-test-utils",
1654-
"slug": "packages-e2e-test-utils",
1655-
"markdown_source": "../packages/e2e-test-utils/README.md",
1656-
"parent": "packages"
1657-
},
16581652
{
16591653
"title": "@wordpress/e2e-tests",
16601654
"slug": "packages-e2e-tests",
@@ -2309,12 +2303,6 @@
23092303
"markdown_source": "../docs/contributors/code/e2e/README.md",
23102304
"parent": "testing-overview"
23112305
},
2312-
{
2313-
"title": "Migration guide",
2314-
"slug": "migration",
2315-
"markdown_source": "../docs/contributors/code/e2e/migration.md",
2316-
"parent": "e2e"
2317-
},
23182306
{
23192307
"title": "Overusing snapshots",
23202308
"slug": "overusing-snapshots",

docs/toc.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@
373373
"docs/contributors/code/testing-overview.md": [
374374
{
375375
"docs/contributors/code/e2e/README.md": [
376-
{
377-
"docs/contributors/code/e2e/migration.md": []
378-
},
379376
{
380377
"docs/contributors/code/e2e/overusing-snapshots.md": []
381378
}

package-lock.json

Lines changed: 1 addition & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/e2e-test-utils-playwright/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"types": "./build-types",
4040
"dependencies": {
4141
"change-case": "^4.1.2",
42-
"form-data": "^4.0.0",
4342
"get-port": "^5.1.1",
4443
"lighthouse": "^12.2.2",
4544
"mime": "^3.0.0",

0 commit comments

Comments
 (0)