@wordpress/e2e-tests 2.5.17 → 3.0.0

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 (47) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE.md +1 -1
  3. package/config/flaky-tests-reporter.js +2 -1
  4. package/package.json +12 -11
  5. package/plugins/query-block.php +2 -2
  6. package/specs/editor/blocks/__snapshots__/heading.test.js.snap +2 -2
  7. package/specs/editor/blocks/__snapshots__/navigation.test.js.snap +29 -57
  8. package/specs/editor/blocks/__snapshots__/spacer.test.js.snap +1 -1
  9. package/specs/editor/blocks/classic.test.js +5 -2
  10. package/specs/editor/blocks/columns.test.js +1 -1
  11. package/specs/editor/blocks/cover.test.js +1 -1
  12. package/specs/editor/blocks/heading.test.js +15 -3
  13. package/specs/editor/blocks/image.test.js +1 -2
  14. package/specs/editor/blocks/navigation.test.js +311 -439
  15. package/specs/editor/blocks/preformatted.test.js +2 -1
  16. package/specs/editor/blocks/site-title.test.js +2 -31
  17. package/specs/editor/fixtures/menu-items-request-fixture.json +84 -0
  18. package/specs/editor/fixtures/menu-items-response-fixture.json +240 -144
  19. package/specs/editor/plugins/block-variations.test.js +1 -1
  20. package/specs/editor/plugins/custom-post-types.test.js +4 -3
  21. package/specs/editor/various/__snapshots__/block-editor-keyboard-shortcuts.test.js.snap +38 -24
  22. package/specs/editor/various/adding-patterns.test.js +1 -1
  23. package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +43 -3
  24. package/specs/editor/various/block-grouping.test.js +2 -18
  25. package/specs/editor/various/block-hierarchy-navigation.test.js +3 -3
  26. package/specs/editor/various/change-detection.test.js +5 -0
  27. package/specs/editor/various/editor-modes.test.js +7 -0
  28. package/specs/editor/various/font-size-picker.test.js +58 -18
  29. package/specs/editor/various/inserting-blocks.test.js +6 -2
  30. package/specs/editor/various/keyboard-navigable-blocks.test.js +6 -0
  31. package/specs/editor/various/list-view.test.js +2 -2
  32. package/specs/editor/various/navigable-toolbar.test.js +2 -2
  33. package/specs/editor/various/post-editor-template-mode.test.js +1 -1
  34. package/specs/editor/various/preview.test.js +67 -2
  35. package/specs/editor/various/reusable-blocks.test.js +53 -31
  36. package/specs/editor/various/undo.test.js +21 -0
  37. package/specs/editor/various/writing-flow.test.js +8 -4
  38. package/specs/performance/site-editor.test.js +1 -1
  39. package/specs/site-editor/document-settings.test.js +5 -5
  40. package/specs/site-editor/multi-entity-editing.test.js +2 -2
  41. package/specs/site-editor/multi-entity-saving.test.js +53 -63
  42. package/specs/site-editor/settings-sidebar.test.js +4 -4
  43. package/specs/site-editor/site-editor-export.test.js +1 -1
  44. package/specs/site-editor/site-editor-inserter.test.js +1 -1
  45. package/specs/site-editor/template-part.test.js +95 -79
  46. package/specs/site-editor/template-revert.test.js +13 -9
  47. package/specs/widgets/customizing-widgets.test.js +7 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.0.0 (2022-01-27)
6
+
7
+ ### Breaking Changes
8
+
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)).
11
+
5
12
  ## 2.5.0 (2021-09-09)
6
13
 
7
14
  ### New Features
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
 
@@ -12,6 +12,7 @@
12
12
  const fs = require( 'fs' ).promises;
13
13
  const path = require( 'path' );
14
14
  const { formatResultsErrors } = require( 'jest-message-util' );
15
+ const filenamify = require( 'filenamify' );
15
16
 
16
17
  class FlakyTestsReporter {
17
18
  constructor( globalConfig, options ) {
@@ -53,7 +54,7 @@ class FlakyTestsReporter {
53
54
  );
54
55
 
55
56
  await fs.writeFile(
56
- `flaky-tests/${ testTitle }.json`,
57
+ `flaky-tests/${ filenamify( testTitle ) }.json`,
57
58
  JSON.stringify( {
58
59
  title: testTitle,
59
60
  path: testPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "2.5.17",
3
+ "version": "3.0.0",
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,25 +23,26 @@
23
23
  "node": ">=12"
24
24
  },
25
25
  "dependencies": {
26
- "@wordpress/e2e-test-utils": "^5.4.10",
27
- "@wordpress/jest-console": "^4.1.1",
28
- "@wordpress/jest-puppeteer-axe": "^3.1.1",
29
- "@wordpress/scripts": "^19.2.4",
30
- "@wordpress/url": "^3.3.1",
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.0",
30
+ "@wordpress/url": "^3.4.0",
31
31
  "chalk": "^4.0.0",
32
32
  "expect-puppeteer": "^4.4.0",
33
- "jest-message-util": "^27.0.6",
33
+ "filenamify": "^4.2.0",
34
+ "jest-message-util": "^27.4.2",
35
+ "jest-snapshot": "^27.4.5",
34
36
  "lodash": "^4.17.21",
35
37
  "puppeteer-testing-library": "^0.5.0",
36
38
  "uuid": "^8.3.0"
37
39
  },
38
40
  "peerDependencies": {
39
- "jest": ">=26",
40
- "jest-snapshot": ">=26",
41
- "puppeteer": ">=1.19.0"
41
+ "jest": ">=27",
42
+ "puppeteer-core": ">=11"
42
43
  },
43
44
  "publishConfig": {
44
45
  "access": "public"
45
46
  },
46
- "gitHead": "823b3225e81748f8febb808e780e2b71478bc854"
47
+ "gitHead": "d95ccb9366e249133cdb1d7b25c382446b9ee502"
47
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 /-->
@@ -13,8 +13,8 @@ exports[`Heading can be created by prefixing number sign and a space 1`] = `
13
13
  `;
14
14
 
15
15
  exports[`Heading should correctly apply custom colors 1`] = `
16
- "<!-- wp:heading {\\"level\\":3,\\"style\\":{\\"color\\":{\\"text\\":\\"#7700ff\\"}}} -->
17
- <h3 class=\\"has-text-color\\" id=\\"heading\\" style=\\"color:#7700ff\\">Heading</h3>
16
+ "<!-- wp:heading {\\"level\\":3,\\"style\\":{\\"color\\":{\\"text\\":\\"#0782f6\\"}}} -->
17
+ <h3 class=\\"has-text-color\\" id=\\"heading\\" style=\\"color:#0782f6\\">Heading</h3>
18
18
  <!-- /wp:heading -->"
19
19
  `;
20
20
 
@@ -1,77 +1,49 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`Navigation Creating from existing Menus allows a navigation block to be created from existing menus 1`] = `
4
- "<!-- wp:navigation -->
5
- <!-- wp:navigation-link {\\"label\\":\\"Home\\",\\"type\\":\\"custom\\",\\"url\\":\\"http://localhost:8889/\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
3
+ exports[`Navigation allows an empty navigation block to be created and manually populated using a mixture of internal and external links 1`] = `
4
+ "<!-- wp:navigation-link {\\"label\\":\\"WP\\",\\"url\\":\\"https://wordpress.org\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
6
5
 
7
- <!-- wp:navigation-submenu {\\"label\\":\\"Accusamus quo repellat illum magnam quas\\",\\"type\\":\\"page\\",\\"id\\":41,\\"url\\":\\"http://localhost:8889/?page_id=41\\",\\"kind\\":\\"post-type\\",\\"isTopLevelItem\\":true} -->
8
- <!-- wp:navigation-link {\\"label\\":\\"Debitis cum consequatur sit doloremque\\",\\"type\\":\\"page\\",\\"id\\":51,\\"url\\":\\"http://localhost:8889/?page_id=51\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":false} /-->
9
- <!-- /wp:navigation-submenu -->
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
+ `;
10
8
 
11
- <!-- wp:navigation-submenu {\\"label\\":\\"Est ea vero non nihil officiis in\\",\\"type\\":\\"page\\",\\"id\\":53,\\"url\\":\\"http://localhost:8889/?page_id=53\\",\\"kind\\":\\"post-type\\",\\"isTopLevelItem\\":true} -->
12
- <!-- wp:navigation-submenu {\\"label\\":\\"Fuga odio quis tempora\\",\\"type\\":\\"page\\",\\"id\\":56,\\"url\\":\\"http://localhost:8889/?page_id=56\\",\\"kind\\":\\"post-type\\",\\"isTopLevelItem\\":false} -->
13
- <!-- wp:navigation-submenu {\\"label\\":\\"In consectetur repellendus eveniet maiores aperiam\\",\\"type\\":\\"page\\",\\"id\\":15,\\"url\\":\\"http://localhost:8889/?page_id=15\\",\\"kind\\":\\"post-type\\",\\"isTopLevelItem\\":false} -->
14
- <!-- wp:navigation-submenu {\\"label\\":\\"Mollitia maiores consequatur ea dolorem blanditiis\\",\\"type\\":\\"page\\",\\"id\\":45,\\"url\\":\\"http://localhost:8889/?page_id=45\\",\\"kind\\":\\"post-type\\",\\"isTopLevelItem\\":false} -->
15
- <!-- wp:navigation-link {\\"label\\":\\"Necessitatibus nisi qui qui necessitatibus quaerat possimus\\",\\"type\\":\\"page\\",\\"id\\":27,\\"url\\":\\"http://localhost:8889/?page_id=27\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":false} /-->
16
- <!-- /wp:navigation-submenu -->
17
- <!-- /wp:navigation-submenu -->
18
- <!-- /wp:navigation-submenu -->
19
- <!-- /wp:navigation-submenu -->
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} /-->"`;
20
10
 
21
- <!-- wp:navigation-link {\\"label\\":\\"Nulla omnis autem dolores eligendi\\",\\"type\\":\\"page\\",\\"id\\":43,\\"url\\":\\"http://localhost:8889/?page_id=43\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->
11
+ exports[`Navigation encodes URL when create block if needed 1`] = `
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} /-->
22
13
 
23
- <!-- wp:navigation-link {\\"label\\":\\"Sample Page\\",\\"type\\":\\"page\\",\\"id\\":2,\\"url\\":\\"http://localhost:8889/?page_id=2\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->
14
+ <!-- wp:navigation-link {\\"label\\":\\"お問い合わせ\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"https://this/is/a/test/search/%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->"
15
+ `;
24
16
 
25
- <!-- wp:navigation-submenu {\\"label\\":\\"Beatae qui labore voluptas eveniet officia quia voluptas qui porro sequi et aut est\\",\\"type\\":\\"category\\",\\"description\\":\\"Ratione nemo ut aut ullam sed assumenda quis est exercitationem\\",\\"id\\":7,\\"url\\":\\"http://localhost:8889/?cat=7\\",\\"kind\\":\\"taxonomy\\",\\"isTopLevelItem\\":true} -->
26
- <!-- wp:navigation-submenu {\\"label\\":\\"Et minus itaque velit tempore hic quisquam saepe quas asperiores\\",\\"type\\":\\"category\\",\\"description\\":\\"Vel fuga enim rerum perspiciatis sapiente mollitia magni ut molestiae labore quae quia quia libero perspiciatis voluptatem quidem deleniti eveniet laboriosam doloribus dolor laborum accusantium modi ducimus itaque rerum cum nostrum\\",\\"id\\":19,\\"url\\":\\"http://localhost:8889/?cat=19\\",\\"kind\\":\\"taxonomy\\",\\"isTopLevelItem\\":false} -->
27
- <!-- wp:navigation-submenu {\\"label\\":\\"Et quas a et mollitia et voluptas optio voluptate quia quo unde aut in nostrum iste impedit quisquam id aut\\",\\"type\\":\\"category\\",\\"description\\":\\"Quas sit labore earum omnis eos sint iste est possimus harum aut soluta sint optio quos distinctio inventore voluptate non ut aliquam ad ut voluptates fugiat numquam magnam modi repellendus modi laudantium et debitis officia est voluptatum quidem unde molestiae animi vero fuga accusamus nam\\",\\"id\\":6,\\"url\\":\\"http://localhost:8889/?cat=6\\",\\"kind\\":\\"taxonomy\\",\\"isTopLevelItem\\":false} -->
28
- <!-- wp:navigation-link {\\"label\\":\\"Illo quis sit impedit itaque expedita earum deserunt magni doloremque velit eum id error\\",\\"type\\":\\"category\\",\\"description\\":\\"Doloremque vero sunt officiis iste voluptatibus voluptas molestiae sint asperiores recusandae amet praesentium et explicabo nesciunt similique voluptatum laudantium amet officiis quas distinctio quis enim nihil tempora\\",\\"id\\":16,\\"url\\":\\"http://localhost:8889/?cat=16\\",\\"kind\\":\\"taxonomy\\",\\"isTopLevelLink\\":false} /-->
29
- <!-- /wp:navigation-submenu -->
30
- <!-- /wp:navigation-submenu -->
31
- <!-- /wp:navigation-submenu -->
17
+ exports[`Navigation placeholder allows a navigation block to be created from existing menus 1`] = `
18
+ "<!-- wp:navigation-link {\\"label\\":\\"Home\\",\\"type\\":\\"custom\\",\\"url\\":\\"http://localhost:8889/\\",\\"kind\\":\\"custom\\"} /-->
32
19
 
33
- <!-- wp:navigation-submenu {\\"label\\":\\"WordPress.org\\",\\"type\\":\\"custom\\",\\"url\\":\\"https://wordpress.org\\",\\"kind\\":\\"custom\\",\\"isTopLevelItem\\":true} -->
34
- <!-- wp:navigation-link {\\"label\\":\\"Google\\",\\"type\\":\\"custom\\",\\"url\\":\\"https://google.com\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":false} /-->
20
+ <!-- wp:navigation-submenu {\\"label\\":\\"About\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} -->
21
+ <!-- wp:navigation-link {\\"label\\":\\"Our team\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
35
22
  <!-- /wp:navigation-submenu -->
36
- <!-- /wp:navigation -->"
37
- `;
38
23
 
39
- exports[`Navigation Creating from existing Menus creates an empty navigation block when the selected existing menu is also empty 1`] = `"<!-- wp:navigation /-->"`;
24
+ <!-- wp:navigation-submenu {\\"label\\":\\"Shop\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} -->
25
+ <!-- wp:navigation-submenu {\\"label\\":\\"Winter apparel\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} -->
26
+ <!-- wp:navigation-link {\\"label\\":\\"Chunky socks\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
40
27
 
41
- exports[`Navigation Creating from existing Pages allows a navigation block to be created using existing pages 1`] = `
42
- "<!-- wp:navigation -->
43
- <!-- wp:page-list /-->
44
- <!-- /wp:navigation -->"
45
- `;
28
+ <!-- wp:navigation-link {\\"label\\":\\"Hideous hats\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
46
29
 
47
- exports[`Navigation Shows the quick inserter when the block contains non-navigation specific blocks 1`] = `
48
- "<!-- wp:navigation -->
49
- <!-- wp:navigation-link {\\"label\\":\\"WP\\",\\"url\\":\\"https://wordpress.org\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
30
+ <!-- wp:navigation-link {\\"label\\":\\"Glorious gloves\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
50
31
 
51
- <!-- wp:site-title /-->
32
+ <!-- wp:navigation-link {\\"label\\":\\"Jazzy Jumpers\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
33
+ <!-- /wp:navigation-submenu -->
34
+ <!-- /wp:navigation-submenu -->
52
35
 
53
- <!-- wp:navigation-link {\\"label\\":\\"WP News\\",\\"url\\":\\"https://wordpress.org/news/\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
54
- <!-- /wp:navigation -->"
55
- `;
36
+ <!-- wp:navigation-link {\\"label\\":\\"Shipping\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
56
37
 
57
- exports[`Navigation allows an empty navigation block to be created and manually populated using a mixture of internal and external links 1`] = `
58
- "<!-- wp:navigation -->
59
- <!-- wp:navigation-link {\\"label\\":\\"WP\\",\\"url\\":\\"https://wordpress.org\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
38
+ <!-- wp:navigation-link {\\"label\\":\\"Contact Us\\",\\"type\\":\\"page\\",\\"id\\":[number],\\"url\\":\\"http://localhost:8889/?page_id=[number]\\",\\"kind\\":\\"post-type\\"} /-->
60
39
 
61
- <!-- wp:navigation-link {\\"label\\":\\"Contact\\",\\"type\\":\\"page\\",\\"id\\":1,\\"url\\":\\"https://this/is/a/test/search/get-in-touch\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->
62
- <!-- /wp:navigation -->"
40
+ <!-- wp:navigation-submenu {\\"label\\":\\"WordPress.org\\",\\"type\\":\\"custom\\",\\"url\\":\\"https://wordpress.org\\",\\"kind\\":\\"custom\\"} -->
41
+ <!-- wp:navigation-link {\\"label\\":\\"Google\\",\\"type\\":\\"custom\\",\\"url\\":\\"https://google.com\\",\\"kind\\":\\"custom\\"} /-->
42
+ <!-- /wp:navigation-submenu -->"
63
43
  `;
64
44
 
65
- exports[`Navigation allows pages to be created from the navigation block and their links added to menu 1`] = `
66
- "<!-- wp:navigation -->
67
- <!-- wp:navigation-link {\\"label\\":\\"A really long page name that will not exist\\",\\"type\\":\\"page\\",\\"id\\":1,\\"url\\":\\"https://this/is/a/test/create/page/my-new-page\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->
68
- <!-- /wp:navigation -->"
69
- `;
45
+ exports[`Navigation placeholder allows a navigation block to be created using existing pages 1`] = `"<!-- wp:page-list /-->"`;
70
46
 
71
- exports[`Navigation encodes URL when create block if needed 1`] = `
72
- "<!-- wp:navigation -->
73
- <!-- wp:navigation-link {\\"label\\":\\"wordpress.org/шеллы\\",\\"url\\":\\"https://wordpress.org/%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\\",\\"kind\\":\\"custom\\",\\"isTopLevelLink\\":true} /-->
47
+ exports[`Navigation placeholder creates an empty navigation block when the selected existing menu is also empty 1`] = `""`;
74
48
 
75
- <!-- wp:navigation-link {\\"label\\":\\"お問い合わせ\\",\\"type\\":\\"page\\",\\"id\\":1,\\"url\\":\\"https://this/is/a/test/search/%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B\\",\\"kind\\":\\"post-type\\",\\"isTopLevelLink\\":true} /-->
76
- <!-- /wp:navigation -->"
77
- `;
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
  );
@@ -21,7 +21,7 @@ describe( 'Columns', () => {
21
21
  await page.click( '.edit-post-header-toolbar__list-view-toggle' );
22
22
  const columnBlockMenuItem = (
23
23
  await page.$x(
24
- '//button[contains(concat(" ", @class, " "), " block-editor-list-view-block-select-button ")][text()="Column"]'
24
+ '//a[contains(concat(" ", @class, " "), " block-editor-list-view-block-select-button ")][text()="Column"]'
25
25
  )
26
26
  )[ 0 ];
27
27
  await columnBlockMenuItem.click();
@@ -131,7 +131,7 @@ describe( 'Cover', () => {
131
131
  // Select the cover block.By default the child paragraph gets selected.
132
132
  await page.click( '.edit-post-header-toolbar__list-view-toggle' );
133
133
  await page.click(
134
- '.block-editor-list-view-block__contents-container button'
134
+ '.block-editor-list-view-block__contents-container a'
135
135
  );
136
136
 
137
137
  const heightInput = (
@@ -9,6 +9,8 @@ import {
9
9
  } from '@wordpress/e2e-test-utils';
10
10
 
11
11
  describe( 'Heading', () => {
12
+ const COLOR_ITEM_SELECTOR =
13
+ '.block-editor-panel-color-gradient-settings__item';
12
14
  const CUSTOM_COLOR_BUTTON_X_SELECTOR = `.components-color-palette__custom-color`;
13
15
  const CUSTOM_COLOR_DETAILS_BUTTON_SELECTOR =
14
16
  '.components-color-picker button[aria-label="Show detailed inputs"]';
@@ -76,6 +78,11 @@ describe( 'Heading', () => {
76
78
  );
77
79
  await colorPanelToggle.click();
78
80
 
81
+ const textColorButton = await page.waitForSelector(
82
+ COLOR_ITEM_SELECTOR
83
+ );
84
+ await textColorButton.click();
85
+
79
86
  const customTextColorButton = await page.waitForSelector(
80
87
  CUSTOM_COLOR_BUTTON_X_SELECTOR
81
88
  );
@@ -85,9 +92,9 @@ describe( 'Heading', () => {
85
92
  await page.waitForSelector( COLOR_INPUT_FIELD_SELECTOR );
86
93
  await page.click( COLOR_INPUT_FIELD_SELECTOR );
87
94
  await pressKeyWithModifier( 'primary', 'A' );
88
- await page.keyboard.type( '7700ff' );
95
+ await page.keyboard.type( '0782f6' );
89
96
  await page.click( 'h3[data-type="core/heading"]' );
90
- await page.waitForXPath( '//button[text()="#7700ff"]' );
97
+ await page.waitForXPath( '//button[text()="#0782f6"]' );
91
98
  expect( await getEditedPostContent() ).toMatchSnapshot();
92
99
  } );
93
100
 
@@ -99,13 +106,18 @@ describe( 'Heading', () => {
99
106
  );
100
107
  await colorPanelToggle.click();
101
108
 
109
+ const textColorButton = await page.waitForSelector(
110
+ COLOR_ITEM_SELECTOR
111
+ );
112
+ await textColorButton.click();
113
+
102
114
  const colorButtonSelector = `//button[@aria-label='Color: Luminous vivid orange']`;
103
115
  const [ colorButton ] = await page.$x( colorButtonSelector );
104
116
  await colorButton.click();
105
- await page.click( 'h2[data-type="core/heading"]' );
106
117
  await page.waitForXPath(
107
118
  `${ colorButtonSelector }[@aria-pressed='true']`
108
119
  );
120
+ await page.click( 'h2[data-type="core/heading"]' );
109
121
  expect( await getEditedPostContent() ).toMatchSnapshot();
110
122
  } );
111
123
  } );
@@ -345,8 +345,7 @@ describe( 'Image', () => {
345
345
 
346
346
  // Clear the input field. Delay added to account for typing delays.
347
347
  const inputField = await page.$( '.block-editor-url-input__input' );
348
- await inputField.click( { clickCount: 3, delay: 100 } );
349
- await page.keyboard.press( 'Backspace', { delay: 100 } );
348
+ await inputField.click( { clickCount: 3, delay: 200 } );
350
349
 
351
350
  // Replace the url. Delay added to account for typing delays.
352
351
  await page.focus( '.block-editor-url-input__input' );