@wordpress/e2e-tests 4.6.0 → 4.7.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/package.json +6 -6
- package/specs/editor/blocks/gallery.test.js +1 -1
- package/specs/editor/blocks/navigation.test.js +1 -37
- package/specs/editor/plugins/meta-boxes.test.js +1 -1
- package/specs/editor/various/compatibility-classic-editor.test.js +1 -1
- package/specs/editor/various/links.test.js +3 -3
- package/specs/editor/various/multi-block-selection.test.js +0 -2
- package/specs/editor/various/post-visibility.test.js +4 -4
- package/specs/editor/various/scheduling.test.js +2 -2
- package/specs/editor/various/{sidebar-permalink-panel.test.js → sidebar-permalink.test.js} +9 -19
- package/specs/editor/various/typewriter.test.js +2 -2
- package/specs/editor/blocks/__snapshots__/list.test.js.snap +0 -337
- package/specs/editor/blocks/comments.test.js +0 -131
- package/specs/editor/blocks/list.test.js +0 -542
- package/specs/editor/plugins/__snapshots__/format-api.test.js.snap +0 -7
- package/specs/editor/plugins/format-api.test.js +0 -36
- package/specs/editor/various/block-mover.test.js +0 -42
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/e2e-tests",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.7.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,11 +23,11 @@
|
|
23
23
|
"node": ">=12"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@wordpress/e2e-test-utils": "^7.
|
27
|
-
"@wordpress/jest-console": "^5.
|
26
|
+
"@wordpress/e2e-test-utils": "^7.9.0",
|
27
|
+
"@wordpress/jest-console": "^5.4.0",
|
28
28
|
"@wordpress/jest-puppeteer-axe": "^4.0.2",
|
29
|
-
"@wordpress/scripts": "^23.
|
30
|
-
"@wordpress/url": "^3.
|
29
|
+
"@wordpress/scripts": "^23.5.0",
|
30
|
+
"@wordpress/url": "^3.14.0",
|
31
31
|
"chalk": "^4.0.0",
|
32
32
|
"expect-puppeteer": "^4.4.0",
|
33
33
|
"filenamify": "^4.2.0",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"publishConfig": {
|
47
47
|
"access": "public"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "9d9d33bbdf317a4381b8ca1713e43bb50df653b3"
|
50
50
|
}
|
@@ -103,7 +103,7 @@ describe( 'Gallery', () => {
|
|
103
103
|
// This xpath selects the anchor node for the block which has a child span which contains the text
|
104
104
|
// label of the block and then selects the expander span for that node.
|
105
105
|
const galleryExpander = await page.waitForXPath(
|
106
|
-
`//a[span[text()='Gallery']]/span[contains(@class, 'block-editor-list-view__expander')]`
|
106
|
+
`//a[.//span[text()='Gallery']]/span[contains(@class, 'block-editor-list-view__expander')]`
|
107
107
|
);
|
108
108
|
|
109
109
|
await galleryExpander.click();
|
@@ -1047,7 +1047,7 @@ Expected mock function not to be called but it was called with: ["POST", "http:/
|
|
1047
1047
|
await openListView();
|
1048
1048
|
|
1049
1049
|
const navExpander = await page.waitForXPath(
|
1050
|
-
`//a[span[text()='Navigation']]/span[contains(@class, 'block-editor-list-view__expander')]`
|
1050
|
+
`//a[.//span[text()='Navigation']]/span[contains(@class, 'block-editor-list-view__expander')]`
|
1051
1051
|
);
|
1052
1052
|
|
1053
1053
|
await navExpander.click();
|
@@ -1317,42 +1317,6 @@ Expected mock function not to be called but it was called with: ["POST", "http:/
|
|
1317
1317
|
await switchUserToAdmin();
|
1318
1318
|
} );
|
1319
1319
|
|
1320
|
-
it( 'shows a warning if user does not have permission to edit or update navigation menus', async () => {
|
1321
|
-
await createNewPost();
|
1322
|
-
await insertBlock( 'Navigation' );
|
1323
|
-
|
1324
|
-
const startEmptyButton = await page.waitForXPath(
|
1325
|
-
START_EMPTY_XPATH
|
1326
|
-
);
|
1327
|
-
|
1328
|
-
// This creates an empty Navigation post type entity.
|
1329
|
-
await startEmptyButton.click();
|
1330
|
-
|
1331
|
-
// Publishing the Post ensures the Navigation entity is saved.
|
1332
|
-
// The Post itself is irrelevant.
|
1333
|
-
await publishPost();
|
1334
|
-
|
1335
|
-
// Switch to a Contributor role user - they should not have
|
1336
|
-
// permission to update Navigation menus.
|
1337
|
-
await loginUser( contributorUsername, contributorPassword );
|
1338
|
-
|
1339
|
-
await createNewPost();
|
1340
|
-
|
1341
|
-
// At this point the block will automatically pick the first Navigation Menu
|
1342
|
-
// which will be the one created by the Admin User.
|
1343
|
-
await insertBlock( 'Navigation' );
|
1344
|
-
|
1345
|
-
// Make sure the snackbar error shows up.
|
1346
|
-
await page.waitForXPath(
|
1347
|
-
`//*[contains(@class, 'components-snackbar__content')][ text()="You do not have permission to edit this Menu. Any changes made will not be saved." ]`
|
1348
|
-
);
|
1349
|
-
|
1350
|
-
// Expect a console 403 for requests to:
|
1351
|
-
// * /wp/v2/settings?_locale=user
|
1352
|
-
// * /wp/v2/templates?context=edit&post_type=post&per_page=100&_locale=user
|
1353
|
-
expect( console ).toHaveErrored();
|
1354
|
-
} );
|
1355
|
-
|
1356
1320
|
it( 'shows a warning if user does not have permission to create navigation menus', async () => {
|
1357
1321
|
const noticeText =
|
1358
1322
|
'You do not have permission to create Navigation Menus.';
|
@@ -59,7 +59,7 @@ describe( 'Meta boxes', () => {
|
|
59
59
|
await viewPostLinks[ 0 ].click();
|
60
60
|
await page.waitForNavigation();
|
61
61
|
|
62
|
-
// Check the
|
62
|
+
// Check the dynamic block appears.
|
63
63
|
const latestPostsBlock = await page.waitForSelector(
|
64
64
|
'.wp-block-latest-posts'
|
65
65
|
);
|
@@ -28,7 +28,7 @@ describe( 'Compatibility with classic editor', () => {
|
|
28
28
|
await viewPostLinks[ 0 ].click();
|
29
29
|
await page.waitForNavigation();
|
30
30
|
|
31
|
-
// Check the
|
31
|
+
// Check the content doesn't contain <p> tags.
|
32
32
|
await page.waitForSelector( '.entry-content' );
|
33
33
|
const content = await page.$eval( '.entry-content', ( element ) =>
|
34
34
|
element.innerHTML.trim()
|
@@ -392,7 +392,7 @@ describe( 'Links', () => {
|
|
392
392
|
await page.waitForSelector( '.block-editor-link-control__search-item' );
|
393
393
|
await page.keyboard.press( 'ArrowDown' );
|
394
394
|
|
395
|
-
// Expect the
|
395
|
+
// Expect the escape key to dismiss the popover when the autocomplete suggestion list is open.
|
396
396
|
await page.keyboard.press( 'Escape' );
|
397
397
|
expect(
|
398
398
|
await page.$(
|
@@ -417,7 +417,7 @@ describe( 'Links', () => {
|
|
417
417
|
)
|
418
418
|
).not.toBeNull();
|
419
419
|
|
420
|
-
// Expect the
|
420
|
+
// Expect the escape key to dismiss the popover normally.
|
421
421
|
await page.keyboard.press( 'Escape' );
|
422
422
|
expect(
|
423
423
|
await page.$(
|
@@ -440,7 +440,7 @@ describe( 'Links', () => {
|
|
440
440
|
await page.keyboard.press( 'Tab' );
|
441
441
|
await page.keyboard.press( 'Tab' );
|
442
442
|
|
443
|
-
// Expect the
|
443
|
+
// Expect the escape key to dismiss the popover normally.
|
444
444
|
await page.keyboard.press( 'Escape' );
|
445
445
|
expect(
|
446
446
|
await page.$(
|
@@ -108,7 +108,6 @@ describe( 'Multi-block selection', () => {
|
|
108
108
|
await pressKeyWithModifier( 'primary', 'a' );
|
109
109
|
await pressKeyWithModifier( 'primary', 'a' );
|
110
110
|
|
111
|
-
await testNativeSelection();
|
112
111
|
expect( await getSelectedFlatIndices() ).toEqual( [ 1, 2, 3 ] );
|
113
112
|
|
114
113
|
// TODO: It would be great to do this test by spying on `wp.a11y.speak`,
|
@@ -420,7 +419,6 @@ describe( 'Multi-block selection', () => {
|
|
420
419
|
await page.mouse.move( coord2.x, coord2.y, { steps: 10 } );
|
421
420
|
await page.mouse.up();
|
422
421
|
|
423
|
-
await testNativeSelection();
|
424
422
|
expect( await getSelectedFlatIndices() ).toEqual( [ 1, 2 ] );
|
425
423
|
} );
|
426
424
|
|
@@ -19,7 +19,7 @@ describe( 'Post visibility', () => {
|
|
19
19
|
|
20
20
|
await openDocumentSettingsSidebar();
|
21
21
|
|
22
|
-
await page.click( '
|
22
|
+
await page.click( '*[aria-label^="Select visibility"]' );
|
23
23
|
|
24
24
|
const [ privateLabel ] = await page.$x(
|
25
25
|
'//label[text()="Private"]'
|
@@ -57,7 +57,7 @@ describe( 'Post visibility', () => {
|
|
57
57
|
.getEditedPostAttribute( 'status' );
|
58
58
|
} );
|
59
59
|
|
60
|
-
await page.click( '
|
60
|
+
await page.click( '*[aria-label^="Select visibility"]' );
|
61
61
|
|
62
62
|
const [ privateLabel ] = await page.$x(
|
63
63
|
'//label[text()="Private"]'
|
@@ -90,7 +90,7 @@ describe( 'Post visibility', () => {
|
|
90
90
|
await openDocumentSettingsSidebar();
|
91
91
|
|
92
92
|
// Set a publish date for the next month.
|
93
|
-
await page.click( '
|
93
|
+
await page.click( '*[aria-label^="Change date"]' );
|
94
94
|
await page.click(
|
95
95
|
'*[aria-label="Move forward to switch to the next month."]'
|
96
96
|
);
|
@@ -100,7 +100,7 @@ describe( 'Post visibility', () => {
|
|
100
100
|
)
|
101
101
|
)[ 0 ].click();
|
102
102
|
|
103
|
-
await page.click( '
|
103
|
+
await page.click( '*[aria-label^="Select visibility"]' );
|
104
104
|
|
105
105
|
const [ privateLabel ] = await page.$x( '//label[text()="Private"]' );
|
106
106
|
await privateLabel.click();
|
@@ -39,7 +39,7 @@ describe( 'Scheduling', () => {
|
|
39
39
|
expect( await getPublishButtonText() ).toBe( 'Publish' );
|
40
40
|
|
41
41
|
// Open the datepicker.
|
42
|
-
await page.click( '
|
42
|
+
await page.click( '*[aria-label^="Change date"]' );
|
43
43
|
|
44
44
|
// Change the publishing date to a year in the future.
|
45
45
|
await page.click( '.components-datetime__time-field-year' );
|
@@ -56,7 +56,7 @@ describe( 'Scheduling', () => {
|
|
56
56
|
it( 'Should keep date time UI focused when the previous and next month buttons are clicked', async () => {
|
57
57
|
await createNewPost();
|
58
58
|
|
59
|
-
await page.click( '
|
59
|
+
await page.click( '*[aria-label^="Change date"]' );
|
60
60
|
await page.click(
|
61
61
|
'*[aria-label="Move backward to switch to the previous month."]'
|
62
62
|
);
|
@@ -5,17 +5,16 @@ import {
|
|
5
5
|
activatePlugin,
|
6
6
|
createNewPost,
|
7
7
|
deactivatePlugin,
|
8
|
-
findSidebarPanelWithTitle,
|
9
8
|
publishPost,
|
10
9
|
} from '@wordpress/e2e-test-utils';
|
11
10
|
|
12
|
-
const
|
11
|
+
const urlButtonSelector = '*[aria-label^="Change URL"]';
|
13
12
|
|
14
13
|
// This tests are not together with the remaining sidebar tests,
|
15
|
-
// because we need to publish/save a post, to correctly test the permalink
|
14
|
+
// because we need to publish/save a post, to correctly test the permalink row.
|
16
15
|
// The sidebar test suit enforces that focus is never lost, but during save operations
|
17
16
|
// the focus is lost and a new element is focused once the save is completed.
|
18
|
-
describe( 'Sidebar Permalink
|
17
|
+
describe( 'Sidebar Permalink', () => {
|
19
18
|
beforeAll( async () => {
|
20
19
|
await activatePlugin( 'gutenberg-test-custom-post-types' );
|
21
20
|
} );
|
@@ -24,39 +23,30 @@ describe( 'Sidebar Permalink Panel', () => {
|
|
24
23
|
await deactivatePlugin( 'gutenberg-test-custom-post-types' );
|
25
24
|
} );
|
26
25
|
|
27
|
-
it( 'should
|
28
|
-
await createNewPost();
|
29
|
-
await page.evaluate( () => {
|
30
|
-
const { removeEditorPanel } = wp.data.dispatch( 'core/edit-post' );
|
31
|
-
removeEditorPanel( 'post-link' );
|
32
|
-
} );
|
33
|
-
expect( await page.$x( permalinkPanelXPath ) ).toEqual( [] );
|
34
|
-
} );
|
35
|
-
|
36
|
-
it( 'should not render link panel when post is publicly queryable but not public', async () => {
|
26
|
+
it( 'should not render URL when post is publicly queryable but not public', async () => {
|
37
27
|
await createNewPost( { postType: 'public_q_not_public' } );
|
38
28
|
await page.keyboard.type( 'aaaaa' );
|
39
29
|
await publishPost();
|
40
30
|
// Start editing again.
|
41
31
|
await page.type( '.editor-post-title__input', ' (Updated)' );
|
42
|
-
expect( await page.$
|
32
|
+
expect( await page.$( urlButtonSelector ) ).toBeNull();
|
43
33
|
} );
|
44
34
|
|
45
|
-
it( 'should not render
|
35
|
+
it( 'should not render URL when post is public but not publicly queryable', async () => {
|
46
36
|
await createNewPost( { postType: 'not_public_q_public' } );
|
47
37
|
await page.keyboard.type( 'aaaaa' );
|
48
38
|
await publishPost();
|
49
39
|
// Start editing again.
|
50
40
|
await page.type( '.editor-post-title__input', ' (Updated)' );
|
51
|
-
expect( await page.$
|
41
|
+
expect( await page.$( urlButtonSelector ) ).toBeNull();
|
52
42
|
} );
|
53
43
|
|
54
|
-
it( 'should render
|
44
|
+
it( 'should render URL when post is public and publicly queryable', async () => {
|
55
45
|
await createNewPost( { postType: 'public_q_public' } );
|
56
46
|
await page.keyboard.type( 'aaaaa' );
|
57
47
|
await publishPost();
|
58
48
|
// Start editing again.
|
59
49
|
await page.type( '.editor-post-title__input', ' (Updated)' );
|
60
|
-
expect( await
|
50
|
+
expect( await page.$( urlButtonSelector ) ).not.toBeNull();
|
61
51
|
} );
|
62
52
|
} );
|
@@ -31,7 +31,7 @@ describe( 'TypeWriter', () => {
|
|
31
31
|
|
32
32
|
expect( await getCaretPosition() ).toBeGreaterThan( initialPosition );
|
33
33
|
|
34
|
-
// Create blocks until the
|
34
|
+
// Create blocks until the typewriter effect kicks in.
|
35
35
|
while (
|
36
36
|
await page.evaluate(
|
37
37
|
() =>
|
@@ -173,7 +173,7 @@ describe( 'TypeWriter', () => {
|
|
173
173
|
|
174
174
|
let count = 0;
|
175
175
|
|
176
|
-
// Create blocks until the
|
176
|
+
// Create blocks until the typewriter effect kicks in, create at
|
177
177
|
// least 10 blocks to properly test the .
|
178
178
|
while (
|
179
179
|
( await page.evaluate(
|
@@ -1,337 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`List can be converted to a quote 1`] = `
|
4
|
-
"<!-- wp:quote -->
|
5
|
-
<blockquote class=\\"wp-block-quote\\"><p>one</p><p>two</p></blockquote>
|
6
|
-
<!-- /wp:quote -->"
|
7
|
-
`;
|
8
|
-
|
9
|
-
exports[`List can be converted to paragraphs 1`] = `
|
10
|
-
"<!-- wp:paragraph -->
|
11
|
-
<p>one</p>
|
12
|
-
<!-- /wp:paragraph -->
|
13
|
-
|
14
|
-
<!-- wp:paragraph -->
|
15
|
-
<p>two</p>
|
16
|
-
<!-- /wp:paragraph -->"
|
17
|
-
`;
|
18
|
-
|
19
|
-
exports[`List can be converted when nested to paragraphs 1`] = `
|
20
|
-
"<!-- wp:paragraph -->
|
21
|
-
<p>one</p>
|
22
|
-
<!-- /wp:paragraph -->
|
23
|
-
|
24
|
-
<!-- wp:paragraph -->
|
25
|
-
<p>two</p>
|
26
|
-
<!-- /wp:paragraph -->"
|
27
|
-
`;
|
28
|
-
|
29
|
-
exports[`List can be created by converting a paragraph 1`] = `
|
30
|
-
"<!-- wp:list -->
|
31
|
-
<ul><li>test</li></ul>
|
32
|
-
<!-- /wp:list -->"
|
33
|
-
`;
|
34
|
-
|
35
|
-
exports[`List can be created by converting a paragraph with line breaks 1`] = `
|
36
|
-
"<!-- wp:list -->
|
37
|
-
<ul><li>one</li><li>two</li></ul>
|
38
|
-
<!-- /wp:list -->"
|
39
|
-
`;
|
40
|
-
|
41
|
-
exports[`List can be created by converting a quote 1`] = `
|
42
|
-
"<!-- wp:list -->
|
43
|
-
<ul><li>one</li><li>two</li></ul>
|
44
|
-
<!-- /wp:list -->"
|
45
|
-
`;
|
46
|
-
|
47
|
-
exports[`List can be created by converting multiple paragraphs 1`] = `
|
48
|
-
"<!-- wp:list -->
|
49
|
-
<ul><li>one</li><li>two</li></ul>
|
50
|
-
<!-- /wp:list -->"
|
51
|
-
`;
|
52
|
-
|
53
|
-
exports[`List can be created by typing "/list" 1`] = `
|
54
|
-
"<!-- wp:list -->
|
55
|
-
<ul><li>I’m a list</li></ul>
|
56
|
-
<!-- /wp:list -->"
|
57
|
-
`;
|
58
|
-
|
59
|
-
exports[`List can be created by typing an asterisk in front of text of a paragraph block 1`] = `
|
60
|
-
"<!-- wp:list -->
|
61
|
-
<ul><li>test</li></ul>
|
62
|
-
<!-- /wp:list -->"
|
63
|
-
`;
|
64
|
-
|
65
|
-
exports[`List can be created by using a number at the start of a paragraph block 1`] = `
|
66
|
-
"<!-- wp:list {\\"ordered\\":true} -->
|
67
|
-
<ol><li>A list item</li></ol>
|
68
|
-
<!-- /wp:list -->"
|
69
|
-
`;
|
70
|
-
|
71
|
-
exports[`List can be created by using an asterisk at the start of a paragraph block 1`] = `
|
72
|
-
"<!-- wp:list -->
|
73
|
-
<ul><li>A list item</li><li>Another list item</li></ul>
|
74
|
-
<!-- /wp:list -->"
|
75
|
-
`;
|
76
|
-
|
77
|
-
exports[`List can undo asterisk transform 1`] = `
|
78
|
-
"<!-- wp:paragraph -->
|
79
|
-
<p>1. </p>
|
80
|
-
<!-- /wp:paragraph -->"
|
81
|
-
`;
|
82
|
-
|
83
|
-
exports[`List first empty list item is graciously removed 1`] = `
|
84
|
-
"<!-- wp:list -->
|
85
|
-
<ul><li>2</li></ul>
|
86
|
-
<!-- /wp:list -->"
|
87
|
-
`;
|
88
|
-
|
89
|
-
exports[`List should be immeadiately saved on indentation 1`] = `
|
90
|
-
"<!-- wp:list -->
|
91
|
-
<ul><li>one<ul><li></li></ul></li></ul>
|
92
|
-
<!-- /wp:list -->"
|
93
|
-
`;
|
94
|
-
|
95
|
-
exports[`List should change the base list type 1`] = `
|
96
|
-
"<!-- wp:list {\\"ordered\\":true} -->
|
97
|
-
<ol><li></li></ol>
|
98
|
-
<!-- /wp:list -->"
|
99
|
-
`;
|
100
|
-
|
101
|
-
exports[`List should change the indented list type 1`] = `
|
102
|
-
"<!-- wp:list -->
|
103
|
-
<ul><li>a<ol><li>1</li></ol></li></ul>
|
104
|
-
<!-- /wp:list -->"
|
105
|
-
`;
|
106
|
-
|
107
|
-
exports[`List should create and remove indented list with keyboard only 1`] = `
|
108
|
-
"<!-- wp:list -->
|
109
|
-
<ul><li>1<ul><li>a<ul><li>i</li></ul></li></ul></li></ul>
|
110
|
-
<!-- /wp:list -->"
|
111
|
-
`;
|
112
|
-
|
113
|
-
exports[`List should create and remove indented list with keyboard only 2`] = `
|
114
|
-
"<!-- wp:list -->
|
115
|
-
<ul><li>1<ul><li>a</li><li></li></ul></li></ul>
|
116
|
-
<!-- /wp:list -->"
|
117
|
-
`;
|
118
|
-
|
119
|
-
exports[`List should create and remove indented list with keyboard only 3`] = `
|
120
|
-
"<!-- wp:list -->
|
121
|
-
<ul><li>1<ul><li>a</li></ul></li><li></li></ul>
|
122
|
-
<!-- /wp:list -->"
|
123
|
-
`;
|
124
|
-
|
125
|
-
exports[`List should create and remove indented list with keyboard only 4`] = `
|
126
|
-
"<!-- wp:list -->
|
127
|
-
<ul><li>1<ul><li>a</li></ul></li></ul>
|
128
|
-
<!-- /wp:list -->"
|
129
|
-
`;
|
130
|
-
|
131
|
-
exports[`List should create and remove indented list with keyboard only 5`] = `
|
132
|
-
"<!-- wp:list -->
|
133
|
-
<ul><li>1</li><li></li></ul>
|
134
|
-
<!-- /wp:list -->"
|
135
|
-
`;
|
136
|
-
|
137
|
-
exports[`List should create and remove indented list with keyboard only 6`] = `
|
138
|
-
"<!-- wp:list -->
|
139
|
-
<ul><li>1</li></ul>
|
140
|
-
<!-- /wp:list -->"
|
141
|
-
`;
|
142
|
-
|
143
|
-
exports[`List should create and remove indented list with keyboard only 7`] = `""`;
|
144
|
-
|
145
|
-
exports[`List should create paragraph on split at end and merge back with content 1`] = `
|
146
|
-
"<!-- wp:list -->
|
147
|
-
<ul><li>one</li></ul>
|
148
|
-
<!-- /wp:list -->
|
149
|
-
|
150
|
-
<!-- wp:paragraph -->
|
151
|
-
<p></p>
|
152
|
-
<!-- /wp:paragraph -->"
|
153
|
-
`;
|
154
|
-
|
155
|
-
exports[`List should create paragraph on split at end and merge back with content 2`] = `
|
156
|
-
"<!-- wp:list -->
|
157
|
-
<ul><li>one</li><li>two</li></ul>
|
158
|
-
<!-- /wp:list -->"
|
159
|
-
`;
|
160
|
-
|
161
|
-
exports[`List should indent and outdent level 1 1`] = `
|
162
|
-
"<!-- wp:list -->
|
163
|
-
<ul><li>a<ul><li>1</li></ul></li></ul>
|
164
|
-
<!-- /wp:list -->"
|
165
|
-
`;
|
166
|
-
|
167
|
-
exports[`List should indent and outdent level 1 2`] = `
|
168
|
-
"<!-- wp:list -->
|
169
|
-
<ul><li>a</li><li>1</li></ul>
|
170
|
-
<!-- /wp:list -->"
|
171
|
-
`;
|
172
|
-
|
173
|
-
exports[`List should indent and outdent level 2 1`] = `
|
174
|
-
"<!-- wp:list -->
|
175
|
-
<ul><li>a<ul><li>1<ul><li>i</li></ul></li></ul></li></ul>
|
176
|
-
<!-- /wp:list -->"
|
177
|
-
`;
|
178
|
-
|
179
|
-
exports[`List should indent and outdent level 2 2`] = `
|
180
|
-
"<!-- wp:list -->
|
181
|
-
<ul><li>a<ul><li>1</li><li>i</li></ul></li></ul>
|
182
|
-
<!-- /wp:list -->"
|
183
|
-
`;
|
184
|
-
|
185
|
-
exports[`List should indent and outdent level 2 3`] = `
|
186
|
-
"<!-- wp:list -->
|
187
|
-
<ul><li>a<ul><li>1</li></ul></li><li>i</li></ul>
|
188
|
-
<!-- /wp:list -->"
|
189
|
-
`;
|
190
|
-
|
191
|
-
exports[`List should insert a line break on shift+enter 1`] = `
|
192
|
-
"<!-- wp:list -->
|
193
|
-
<ul><li>a<br></li></ul>
|
194
|
-
<!-- /wp:list -->"
|
195
|
-
`;
|
196
|
-
|
197
|
-
exports[`List should insert a line break on shift+enter in a non trailing list item 1`] = `
|
198
|
-
"<!-- wp:list -->
|
199
|
-
<ul><li>a</li><li>b<br></li><li>c</li></ul>
|
200
|
-
<!-- /wp:list -->"
|
201
|
-
`;
|
202
|
-
|
203
|
-
exports[`List should not change the contents when you change the list type to Unordered 1`] = `"<li>a</li><li>b</li><li>c</li>"`;
|
204
|
-
|
205
|
-
exports[`List should not change the contents when you change the list type to Ordered 1`] = `"<li>1</li><li>2</li><li>3</li>"`;
|
206
|
-
|
207
|
-
exports[`List should not indent list on space with modifier 1`] = `
|
208
|
-
"<!-- wp:list -->
|
209
|
-
<ul><li>1</li><li> </li></ul>
|
210
|
-
<!-- /wp:list -->"
|
211
|
-
`;
|
212
|
-
|
213
|
-
exports[`List should not transform lines in block when transforming multiple blocks 1`] = `
|
214
|
-
"<!-- wp:list -->
|
215
|
-
<ul><li>one<br>...</li><li>two</li></ul>
|
216
|
-
<!-- /wp:list -->"
|
217
|
-
`;
|
218
|
-
|
219
|
-
exports[`List should not undo asterisk transform with backspace after selection change 1`] = `""`;
|
220
|
-
|
221
|
-
exports[`List should not undo asterisk transform with backspace after typing 1`] = `""`;
|
222
|
-
|
223
|
-
exports[`List should only convert to list when shortcut ends with space 1`] = `
|
224
|
-
"<!-- wp:paragraph -->
|
225
|
-
<p>* </p>
|
226
|
-
<!-- /wp:paragraph -->"
|
227
|
-
`;
|
228
|
-
|
229
|
-
exports[`List should outdent with children 1`] = `
|
230
|
-
"<!-- wp:list -->
|
231
|
-
<ul><li>a<ul><li>b<ul><li>c</li></ul></li></ul></li></ul>
|
232
|
-
<!-- /wp:list -->"
|
233
|
-
`;
|
234
|
-
|
235
|
-
exports[`List should outdent with children 2`] = `
|
236
|
-
"<!-- wp:list -->
|
237
|
-
<ul><li>a</li><li>b<ul><li>c</li></ul></li></ul>
|
238
|
-
<!-- /wp:list -->"
|
239
|
-
`;
|
240
|
-
|
241
|
-
exports[`List should place the caret in the right place with nested list 1`] = `
|
242
|
-
"<!-- wp:list -->
|
243
|
-
<ul><li>1</li><li>2<ul><li>a</li></ul></li></ul>
|
244
|
-
<!-- /wp:list -->"
|
245
|
-
`;
|
246
|
-
|
247
|
-
exports[`List should preserve indentation after merging backward and forward 1`] = `
|
248
|
-
"<!-- wp:list -->
|
249
|
-
<ul><li>1<ul><li>2</li><li>3</li></ul></li><li></li></ul>
|
250
|
-
<!-- /wp:list -->"
|
251
|
-
`;
|
252
|
-
|
253
|
-
exports[`List should preserve indentation after merging backward and forward 2`] = `
|
254
|
-
"<!-- wp:list -->
|
255
|
-
<ul><li>1<ul><li>2</li><li>3</li></ul></li></ul>
|
256
|
-
<!-- /wp:list -->"
|
257
|
-
`;
|
258
|
-
|
259
|
-
exports[`List should split indented list item 1`] = `
|
260
|
-
"<!-- wp:list -->
|
261
|
-
<ul><li>one<ul><li>two</li><li>three</li></ul></li></ul>
|
262
|
-
<!-- /wp:list -->"
|
263
|
-
`;
|
264
|
-
|
265
|
-
exports[`List should split into two ordered lists with paragraph 1`] = `
|
266
|
-
"<!-- wp:list {\\"ordered\\":true} -->
|
267
|
-
<ol><li>one</li></ol>
|
268
|
-
<!-- /wp:list -->
|
269
|
-
|
270
|
-
<!-- wp:paragraph -->
|
271
|
-
<p></p>
|
272
|
-
<!-- /wp:paragraph -->
|
273
|
-
|
274
|
-
<!-- wp:list {\\"ordered\\":true} -->
|
275
|
-
<ol><li>two</li></ol>
|
276
|
-
<!-- /wp:list -->"
|
277
|
-
`;
|
278
|
-
|
279
|
-
exports[`List should split into two with paragraph and merge lists 1`] = `
|
280
|
-
"<!-- wp:list -->
|
281
|
-
<ul><li>one</li><li></li><li>two</li></ul>
|
282
|
-
<!-- /wp:list -->"
|
283
|
-
`;
|
284
|
-
|
285
|
-
exports[`List should split into two with paragraph and merge lists 2`] = `
|
286
|
-
"<!-- wp:list -->
|
287
|
-
<ul><li>one</li></ul>
|
288
|
-
<!-- /wp:list -->
|
289
|
-
|
290
|
-
<!-- wp:paragraph -->
|
291
|
-
<p></p>
|
292
|
-
<!-- /wp:paragraph -->
|
293
|
-
|
294
|
-
<!-- wp:list -->
|
295
|
-
<ul><li>two</li></ul>
|
296
|
-
<!-- /wp:list -->"
|
297
|
-
`;
|
298
|
-
|
299
|
-
exports[`List should split into two with paragraph and merge lists 3`] = `
|
300
|
-
"<!-- wp:list -->
|
301
|
-
<ul><li>one</li><li></li></ul>
|
302
|
-
<!-- /wp:list -->
|
303
|
-
|
304
|
-
<!-- wp:list -->
|
305
|
-
<ul><li>two</li></ul>
|
306
|
-
<!-- /wp:list -->"
|
307
|
-
`;
|
308
|
-
|
309
|
-
exports[`List should undo asterisk transform with backspace 1`] = `
|
310
|
-
"<!-- wp:paragraph -->
|
311
|
-
<p>* </p>
|
312
|
-
<!-- /wp:paragraph -->"
|
313
|
-
`;
|
314
|
-
|
315
|
-
exports[`List should undo asterisk transform with backspace after selection changes 1`] = `
|
316
|
-
"<!-- wp:paragraph -->
|
317
|
-
<p>* </p>
|
318
|
-
<!-- /wp:paragraph -->"
|
319
|
-
`;
|
320
|
-
|
321
|
-
exports[`List should undo asterisk transform with backspace after selection changes without requestIdleCallback 1`] = `
|
322
|
-
"<!-- wp:paragraph -->
|
323
|
-
<p>* </p>
|
324
|
-
<!-- /wp:paragraph -->"
|
325
|
-
`;
|
326
|
-
|
327
|
-
exports[`List should undo asterisk transform with backspace setting isTyping state 1`] = `
|
328
|
-
"<!-- wp:paragraph -->
|
329
|
-
<p>* </p>
|
330
|
-
<!-- /wp:paragraph -->"
|
331
|
-
`;
|
332
|
-
|
333
|
-
exports[`List should undo asterisk transform with escape 1`] = `
|
334
|
-
"<!-- wp:paragraph -->
|
335
|
-
<p>* </p>
|
336
|
-
<!-- /wp:paragraph -->"
|
337
|
-
`;
|