@wordpress/e2e-tests 3.0.1-next.33ec3857e2.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/LICENSE.md +1 -1
  3. package/package.json +9 -9
  4. package/plugins/query-block.php +2 -2
  5. package/specs/editor/blocks/__snapshots__/navigation.test.js.snap +4 -0
  6. package/specs/editor/blocks/__snapshots__/spacer.test.js.snap +1 -1
  7. package/specs/editor/blocks/classic.test.js +5 -2
  8. package/specs/editor/blocks/navigation.test.js +280 -191
  9. package/specs/editor/plugins/block-variations.test.js +1 -1
  10. package/specs/editor/plugins/iframed-inline-styles.test.js +0 -6
  11. package/specs/editor/plugins/iframed-multiple-block-stylesheets.test.js +0 -4
  12. package/specs/editor/various/__snapshots__/block-editor-keyboard-shortcuts.test.js.snap +38 -24
  13. package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +43 -3
  14. package/specs/editor/various/font-size-picker.test.js +57 -11
  15. package/specs/editor/various/post-editor-template-mode.test.js +1 -1
  16. package/specs/editor/various/preview.test.js +66 -1
  17. package/specs/editor/various/reusable-blocks.test.js +52 -5
  18. package/specs/editor/various/undo.test.js +21 -0
  19. package/specs/performance/site-editor.test.js +1 -1
  20. package/specs/site-editor/document-settings.test.js +4 -4
  21. package/specs/site-editor/multi-entity-editing.test.js +2 -2
  22. package/specs/site-editor/multi-entity-saving.test.js +15 -18
  23. package/specs/site-editor/settings-sidebar.test.js +4 -4
  24. package/specs/site-editor/site-editor-export.test.js +1 -1
  25. package/specs/site-editor/site-editor-inserter.test.js +1 -1
  26. package/specs/site-editor/template-part.test.js +9 -12
  27. package/specs/site-editor/template-revert.test.js +13 -9
  28. package/specs/widgets/customizing-widgets.test.js +3 -23
  29. package/specs/widgets/editing-widgets.test.js +36 -12
package/CHANGELOG.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 3.0.0-next.0 (2021-12-20)
5
+ ## 3.0.0 (2022-01-27)
6
6
 
7
7
  ### Breaking Changes
8
8
 
9
9
  - The peer `puppeteer` dependency has been replaced with `puppeteer-core` requiring version `>=11` (see [Breaking Changes](https://github.com/puppeteer/puppeteer/releases/tag/v11.0.0), [#36040](https://github.com/WordPress/gutenberg/pull/36040)).
10
+ - The peer `jest` dependency has been updated from requiring `>=26` to requiring `>=27` (see [Breaking Changes](https://jestjs.io/blog/2021/05/25/jest-27), [#33287](https://github.com/WordPress/gutenberg/pull/33287)).
10
11
 
11
12
  ## 2.5.0 (2021-09-09)
12
13
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Gutenberg
2
2
 
3
- Copyright 2016-2021 by the contributors
3
+ Copyright 2016-2022 by the contributors
4
4
 
5
5
  **License for Contributions (on and after April 15, 2021)**
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "3.0.1-next.33ec3857e2.0",
3
+ "version": "3.0.1",
4
4
  "description": "End-To-End (E2E) tests for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -23,26 +23,26 @@
23
23
  "node": ">=12"
24
24
  },
25
25
  "dependencies": {
26
- "@wordpress/e2e-test-utils": "^6.0.1-next.33ec3857e2.0",
27
- "@wordpress/jest-console": "^4.1.2-next.33ec3857e2.0",
28
- "@wordpress/jest-puppeteer-axe": "^4.0.1-next.33ec3857e2.0",
29
- "@wordpress/scripts": "^20.0.1-next.33ec3857e2.0",
30
- "@wordpress/url": "^3.3.2-next.33ec3857e2.0",
26
+ "@wordpress/e2e-test-utils": "^6.0.0",
27
+ "@wordpress/jest-console": "^5.0.0",
28
+ "@wordpress/jest-puppeteer-axe": "^4.0.0",
29
+ "@wordpress/scripts": "^20.0.1",
30
+ "@wordpress/url": "^3.4.0",
31
31
  "chalk": "^4.0.0",
32
32
  "expect-puppeteer": "^4.4.0",
33
33
  "filenamify": "^4.2.0",
34
- "jest-message-util": "^27.0.6",
34
+ "jest-message-util": "^27.4.2",
35
35
  "jest-snapshot": "^27.4.5",
36
36
  "lodash": "^4.17.21",
37
37
  "puppeteer-testing-library": "^0.5.0",
38
38
  "uuid": "^8.3.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "jest": ">=26",
41
+ "jest": ">=27",
42
42
  "puppeteer-core": ">=11"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "51c7917ea7fac72953702f24d6daac87d99e7617"
47
+ "gitHead": "a060ce571caca7e45c642f0213624990e75802cd"
48
48
  }
@@ -16,7 +16,7 @@ register_block_pattern(
16
16
  array(
17
17
  'title' => __( 'Query Test 1', 'gutenberg' ),
18
18
  'blockTypes' => array( 'core/query' ),
19
- 'content' => '<!-- wp:query {"query":{"perPage":1,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
19
+ 'content' => '<!-- wp:query {"query":{"perPage":1,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
20
20
  <!-- wp:post-template -->
21
21
  <!-- wp:post-title {"isLink":true} /-->
22
22
  <!-- /wp:post-template -->
@@ -28,7 +28,7 @@ register_block_pattern(
28
28
  array(
29
29
  'title' => __( 'Query Test 2', 'gutenberg' ),
30
30
  'blockTypes' => array( 'core/query' ),
31
- 'content' => '<!-- wp:query {"query":{"perPage":1,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
31
+ 'content' => '<!-- wp:query {"query":{"perPage":1,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
32
32
  <!-- wp:post-template -->
33
33
  <!-- wp:post-title {"isLink":true} /-->
34
34
  <!-- wp:post-date /-->
@@ -6,6 +6,8 @@ exports[`Navigation allows an empty navigation block to be created and manually
6
6
  <!-- wp:navigation-link {\\"label\\":\\"Contact\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"https://this/is/a/test/search/get-in-touch\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->"
7
7
  `;
8
8
 
9
+ exports[`Navigation allows pages to be created from the navigation block and their links added to menu 1`] = `"<!-- wp:navigation-link {\\"label\\":\\"A really long page name that will not exist\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->"`;
10
+
9
11
  exports[`Navigation encodes URL when create block if needed 1`] = `
10
12
  "<!-- wp:navigation-link {\\"label\\":\\"wordpress.org/шеллы\\",\\"url\\":\\"https://wordpress.org/%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
11
13
 
@@ -43,3 +45,5 @@ exports[`Navigation placeholder allows a navigation block to be created from exi
43
45
  exports[`Navigation placeholder allows a navigation block to be created using existing pages 1`] = `"<!-- wp:page-list /-->"`;
44
46
 
45
47
  exports[`Navigation placeholder creates an empty navigation block when the selected existing menu is also empty 1`] = `""`;
48
+
49
+ exports[`Navigation supports navigation blocks that have inner blocks within their markup and converts them to wp_navigation posts 1`] = `"<!-- wp:page-list /-->"`;
@@ -7,7 +7,7 @@ exports[`Spacer can be created by typing "/spacer" 1`] = `
7
7
  `;
8
8
 
9
9
  exports[`Spacer can be resized using the drag handle and remains selected after being dragged 1`] = `
10
- "<!-- wp:spacer {\\"height\\":150} -->
10
+ "<!-- wp:spacer {\\"height\\":\\"150px\\"} -->
11
11
  <div style=\\"height:150px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>
12
12
  <!-- /wp:spacer -->"
13
13
  `;
@@ -45,8 +45,10 @@ describe( 'Classic', () => {
45
45
  await page.keyboard.type( 'test' );
46
46
 
47
47
  // Click the image button.
48
- await page.waitForSelector( 'div[aria-label^="Add Media"]' );
49
- await page.click( 'div[aria-label^="Add Media"]' );
48
+ const addMediaButton = await page.waitForSelector(
49
+ 'div[aria-label^="Add Media"]'
50
+ );
51
+ await addMediaButton.click();
50
52
 
51
53
  await page.click( '.media-menu-item#menu-item-gallery' );
52
54
 
@@ -92,6 +94,7 @@ describe( 'Classic', () => {
92
94
 
93
95
  // Check that you can undo back to a Classic block gallery in one step.
94
96
  await pressKeyWithModifier( 'primary', 'z' );
97
+ await page.waitForSelector( 'div[aria-label="Block: Classic"]' );
95
98
  expect( await getEditedPostContent() ).toMatch(
96
99
  /\[gallery ids=\"\d+\"\]/
97
100
  );