@wordpress/e2e-tests 2.5.16 → 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.
- 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 +95 -57
- 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
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
getEditedPostContent,
|
8
8
|
createNewPost,
|
9
9
|
insertBlock,
|
10
|
+
clickBlockAppender,
|
10
11
|
} from '@wordpress/e2e-test-utils';
|
11
12
|
|
12
13
|
describe( 'Preformatted', () => {
|
@@ -39,7 +40,7 @@ describe( 'Preformatted', () => {
|
|
39
40
|
await page.keyboard.press( 'Enter' );
|
40
41
|
await page.keyboard.type( '2' );
|
41
42
|
await page.keyboard.press( 'Enter' );
|
42
|
-
await
|
43
|
+
await clickBlockAppender();
|
43
44
|
await page.keyboard.type( '3' );
|
44
45
|
await page.keyboard.press( 'ArrowLeft' );
|
45
46
|
await page.keyboard.press( 'Backspace' );
|
@@ -5,42 +5,13 @@ import {
|
|
5
5
|
createNewPost,
|
6
6
|
createUser,
|
7
7
|
deleteUser,
|
8
|
+
getOption,
|
8
9
|
insertBlock,
|
9
10
|
loginUser,
|
10
11
|
pressKeyWithModifier,
|
11
|
-
|
12
|
-
switchUserToTest,
|
13
|
-
visitAdminPage,
|
12
|
+
setOption,
|
14
13
|
} from '@wordpress/e2e-test-utils';
|
15
14
|
|
16
|
-
async function getOption( setting ) {
|
17
|
-
await switchUserToAdmin();
|
18
|
-
await visitAdminPage( 'options.php' );
|
19
|
-
|
20
|
-
const value = await page.$eval(
|
21
|
-
`#${ setting }`,
|
22
|
-
( element ) => element.value
|
23
|
-
);
|
24
|
-
await switchUserToTest();
|
25
|
-
return value;
|
26
|
-
}
|
27
|
-
|
28
|
-
async function setOption( setting, value ) {
|
29
|
-
await switchUserToAdmin();
|
30
|
-
await visitAdminPage( 'options-general.php' );
|
31
|
-
|
32
|
-
await page.focus( `#${ setting }` );
|
33
|
-
await pressKeyWithModifier( 'primary', 'a' );
|
34
|
-
await page.type( `#${ setting }`, value );
|
35
|
-
|
36
|
-
await Promise.all( [
|
37
|
-
page.click( '#submit' ),
|
38
|
-
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
|
39
|
-
] );
|
40
|
-
|
41
|
-
await switchUserToTest();
|
42
|
-
}
|
43
|
-
|
44
15
|
const saveEntities = async () => {
|
45
16
|
const savePostSelector = '.editor-post-publish-button__button';
|
46
17
|
const savePanelSelector = '.entities-saved-states__panel';
|
@@ -0,0 +1,84 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"title": "Home",
|
4
|
+
"url": "http://localhost:8889/",
|
5
|
+
"menu_order": 1
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"title": "About",
|
9
|
+
"type": "post_type",
|
10
|
+
"object": "page",
|
11
|
+
"menu_order": 2
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"title": "Our team",
|
15
|
+
"type": "post_type",
|
16
|
+
"object": "page",
|
17
|
+
"menu_order": 3,
|
18
|
+
"parent": 1
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"title": "Shop",
|
22
|
+
"type": "post_type",
|
23
|
+
"object": "page",
|
24
|
+
"menu_order": 4
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"title": "Winter apparel",
|
28
|
+
"type": "post_type",
|
29
|
+
"object": "page",
|
30
|
+
"menu_order": 5,
|
31
|
+
"parent": 3
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"title": "Chunky socks",
|
35
|
+
"type": "post_type",
|
36
|
+
"object": "page",
|
37
|
+
"menu_order": 6,
|
38
|
+
"parent": 4
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"title": "Hideous hats",
|
42
|
+
"type": "post_type",
|
43
|
+
"object": "page",
|
44
|
+
"menu_order": 7,
|
45
|
+
"parent": 4
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"title": "Glorious gloves",
|
49
|
+
"type": "post_type",
|
50
|
+
"object": "page",
|
51
|
+
"menu_order": 8,
|
52
|
+
"parent": 4
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"title": "Jazzy Jumpers",
|
56
|
+
"type": "post_type",
|
57
|
+
"object": "page",
|
58
|
+
"menu_order": 9,
|
59
|
+
"parent": 4
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"title": "Shipping",
|
63
|
+
"type": "post_type",
|
64
|
+
"object": "page",
|
65
|
+
"menu_order": 10
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"title": "Contact Us",
|
69
|
+
"type": "post_type",
|
70
|
+
"object": "page",
|
71
|
+
"menu_order": 11
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"title": "WordPress.org",
|
75
|
+
"url": "https://wordpress.org",
|
76
|
+
"menu_order": 12
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"title": "Google",
|
80
|
+
"url": "https://google.com",
|
81
|
+
"menu_order": 13,
|
82
|
+
"parent": 11
|
83
|
+
}
|
84
|
+
]
|