@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.
- package/CHANGELOG.md +7 -0
- package/LICENSE.md +1 -1
- package/config/flaky-tests-reporter.js +2 -1
- package/package.json +12 -11
- package/plugins/query-block.php +2 -2
- package/specs/editor/blocks/__snapshots__/heading.test.js.snap +2 -2
- package/specs/editor/blocks/__snapshots__/navigation.test.js.snap +29 -57
- package/specs/editor/blocks/__snapshots__/spacer.test.js.snap +1 -1
- package/specs/editor/blocks/classic.test.js +5 -2
- package/specs/editor/blocks/columns.test.js +1 -1
- package/specs/editor/blocks/cover.test.js +1 -1
- package/specs/editor/blocks/heading.test.js +15 -3
- package/specs/editor/blocks/image.test.js +1 -2
- package/specs/editor/blocks/navigation.test.js +311 -439
- package/specs/editor/blocks/preformatted.test.js +2 -1
- package/specs/editor/blocks/site-title.test.js +2 -31
- package/specs/editor/fixtures/menu-items-request-fixture.json +84 -0
- package/specs/editor/fixtures/menu-items-response-fixture.json +240 -144
- package/specs/editor/plugins/block-variations.test.js +1 -1
- package/specs/editor/plugins/custom-post-types.test.js +4 -3
- package/specs/editor/various/__snapshots__/block-editor-keyboard-shortcuts.test.js.snap +38 -24
- package/specs/editor/various/adding-patterns.test.js +1 -1
- package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +43 -3
- package/specs/editor/various/block-grouping.test.js +2 -18
- package/specs/editor/various/block-hierarchy-navigation.test.js +3 -3
- package/specs/editor/various/change-detection.test.js +5 -0
- package/specs/editor/various/editor-modes.test.js +7 -0
- package/specs/editor/various/font-size-picker.test.js +58 -18
- package/specs/editor/various/inserting-blocks.test.js +6 -2
- package/specs/editor/various/keyboard-navigable-blocks.test.js +6 -0
- package/specs/editor/various/list-view.test.js +2 -2
- package/specs/editor/various/navigable-toolbar.test.js +2 -2
- package/specs/editor/various/post-editor-template-mode.test.js +1 -1
- package/specs/editor/various/preview.test.js +67 -2
- package/specs/editor/various/reusable-blocks.test.js +53 -31
- package/specs/editor/various/undo.test.js +21 -0
- package/specs/editor/various/writing-flow.test.js +8 -4
- package/specs/performance/site-editor.test.js +1 -1
- package/specs/site-editor/document-settings.test.js +5 -5
- package/specs/site-editor/multi-entity-editing.test.js +2 -2
- package/specs/site-editor/multi-entity-saving.test.js +53 -63
- package/specs/site-editor/settings-sidebar.test.js +4 -4
- package/specs/site-editor/site-editor-export.test.js +1 -1
- package/specs/site-editor/site-editor-inserter.test.js +1 -1
- package/specs/site-editor/template-part.test.js +95 -79
- package/specs/site-editor/template-revert.test.js +13 -9
- 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
@@ -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": "
|
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": "^
|
27
|
-
"@wordpress/jest-console": "^
|
28
|
-
"@wordpress/jest-puppeteer-axe": "^
|
29
|
-
"@wordpress/scripts": "^
|
30
|
-
"@wordpress/url": "^3.
|
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
|
-
"
|
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": ">=
|
40
|
-
"
|
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": "
|
47
|
+
"gitHead": "d95ccb9366e249133cdb1d7b25c382446b9ee502"
|
47
48
|
}
|
package/plugins/query-block.php
CHANGED
@@ -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","
|
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","
|
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\\":\\"#
|
17
|
-
<h3 class=\\"has-text-color\\" id=\\"heading\\" style=\\"color:#
|
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
|
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-
|
8
|
-
|
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-
|
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
|
-
|
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\\":\\"
|
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
|
-
|
26
|
-
<!-- wp:navigation-
|
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\\":\\"
|
34
|
-
<!-- wp:navigation-link {\\"label\\":\\"
|
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
|
-
|
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
|
-
|
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
|
-
|
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:
|
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\\":\\"
|
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
|
-
|
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-
|
62
|
-
<!--
|
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
|
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
|
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:
|
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\\"
|
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(
|
49
|
-
|
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
|
-
'//
|
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
|
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( '
|
95
|
+
await page.keyboard.type( '0782f6' );
|
89
96
|
await page.click( 'h3[data-type="core/heading"]' );
|
90
|
-
await page.waitForXPath( '//button[text()="#
|
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:
|
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' );
|