@wordpress/e2e-tests 4.4.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/config/flaky-tests-reporter.js +2 -3
- package/package.json +6 -6
- package/specs/editor/blocks/cover.test.js +10 -14
- package/specs/editor/blocks/gallery.test.js +1 -1
- package/specs/editor/blocks/navigation.test.js +15 -50
- package/specs/editor/plugins/cpt-locking.test.js +2 -3
- package/specs/editor/plugins/iframed-block.test.js +3 -2
- package/specs/editor/plugins/iframed-masonry-block.test.js +3 -2
- package/specs/editor/plugins/inner-blocks-allowed-blocks.test.js +3 -1
- 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/datepicker.test.js +12 -12
- package/specs/editor/various/embedding.test.js +2 -4
- package/specs/editor/various/links.test.js +5 -6
- package/specs/editor/various/multi-block-selection.test.js +0 -2
- package/specs/editor/various/navigable-toolbar.test.js +2 -3
- package/specs/editor/various/post-visibility.test.js +4 -4
- package/specs/editor/various/publishing.test.js +4 -2
- 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/sidebar.test.js +4 -6
- package/specs/editor/various/taxonomies.test.js +8 -7
- package/specs/editor/various/typewriter.test.js +2 -2
- package/specs/experiments/navigation-editor.test.js +4 -6
- package/specs/performance/post-editor.test.js +10 -14
- package/specs/performance/site-editor.test.js +2 -5
- package/specs/widgets/editing-widgets.test.js +12 -8
- package/specs/editor/blocks/__snapshots__/buttons.test.js.snap +0 -33
- package/specs/editor/blocks/__snapshots__/list.test.js.snap +0 -337
- package/specs/editor/blocks/__snapshots__/spacer.test.js.snap +0 -13
- package/specs/editor/blocks/__snapshots__/table.test.js.snap +0 -61
- package/specs/editor/blocks/buttons.test.js +0 -95
- package/specs/editor/blocks/comments.test.js +0 -131
- package/specs/editor/blocks/list.test.js +0 -542
- package/specs/editor/blocks/spacer.test.js +0 -48
- package/specs/editor/blocks/table.test.js +0 -296
- 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/__snapshots__/rtl.test.js.snap +0 -63
- package/specs/editor/various/block-mover.test.js +0 -42
- package/specs/editor/various/preview.test.js +0 -425
- package/specs/editor/various/rtl.test.js +0 -129
- package/specs/site-editor/style-variations.test.js +0 -213
- package/themes/style-variations/block-templates/index.html +0 -11
- package/themes/style-variations/index.php +0 -0
- package/themes/style-variations/style.css +0 -15
- package/themes/style-variations/styles/pink.json +0 -33
- package/themes/style-variations/styles/yellow.json +0 -12
- package/themes/style-variations/theme.json +0 -8
@@ -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(
|
@@ -681,17 +681,15 @@ describe.skip( 'Navigation editor', () => {
|
|
681
681
|
|
682
682
|
// Get the title/label of the last Nav item inside the Nav block.
|
683
683
|
const lastItemAttributes = await page.evaluate( () => {
|
684
|
-
const { getBlockOrder, getBlocks } =
|
685
|
-
'core/block-editor'
|
686
|
-
);
|
684
|
+
const { getBlockOrder, getBlocks } =
|
685
|
+
wp.data.select( 'core/block-editor' );
|
687
686
|
|
688
687
|
const lockedNavigationBlock = getBlockOrder()[ 0 ];
|
689
688
|
|
690
689
|
const navItemBlocks = getBlocks( lockedNavigationBlock );
|
691
690
|
|
692
|
-
const { attributes } =
|
693
|
-
navItemBlocks.length - 1
|
694
|
-
];
|
691
|
+
const { attributes } =
|
692
|
+
navItemBlocks[ navItemBlocks.length - 1 ];
|
695
693
|
|
696
694
|
return attributes;
|
697
695
|
} );
|
@@ -3,7 +3,6 @@
|
|
3
3
|
*/
|
4
4
|
import { basename, join } from 'path';
|
5
5
|
import { writeFileSync } from 'fs';
|
6
|
-
import { sum } from 'lodash';
|
7
6
|
|
8
7
|
/**
|
9
8
|
* WordPress dependencies
|
@@ -136,11 +135,8 @@ describe( 'Post Editor Performance', () => {
|
|
136
135
|
}
|
137
136
|
await page.tracing.stop();
|
138
137
|
traceResults = JSON.parse( readFile( traceFile ) );
|
139
|
-
const [
|
140
|
-
|
141
|
-
keyPressEvents,
|
142
|
-
keyUpEvents,
|
143
|
-
] = getTypingEventDurations( traceResults );
|
138
|
+
const [ keyDownEvents, keyPressEvents, keyUpEvents ] =
|
139
|
+
getTypingEventDurations( traceResults );
|
144
140
|
if (
|
145
141
|
keyDownEvents.length === keyPressEvents.length &&
|
146
142
|
keyPressEvents.length === keyUpEvents.length
|
@@ -226,6 +222,10 @@ describe( 'Post Editor Performance', () => {
|
|
226
222
|
} );
|
227
223
|
|
228
224
|
it( 'Searching the inserter', async () => {
|
225
|
+
function sum( arr ) {
|
226
|
+
return arr.reduce( ( a, b ) => a + b, 0 );
|
227
|
+
}
|
228
|
+
|
229
229
|
// Measure time to search the inserter and get results.
|
230
230
|
await openGlobalBlockInserter();
|
231
231
|
for ( let j = 0; j < 10; j++ ) {
|
@@ -240,11 +240,8 @@ describe( 'Post Editor Performance', () => {
|
|
240
240
|
await page.keyboard.type( 'p' );
|
241
241
|
await page.tracing.stop();
|
242
242
|
traceResults = JSON.parse( readFile( traceFile ) );
|
243
|
-
const [
|
244
|
-
|
245
|
-
keyPressEvents,
|
246
|
-
keyUpEvents,
|
247
|
-
] = getTypingEventDurations( traceResults );
|
243
|
+
const [ keyDownEvents, keyPressEvents, keyUpEvents ] =
|
244
|
+
getTypingEventDurations( traceResults );
|
248
245
|
if (
|
249
246
|
keyDownEvents.length === keyPressEvents.length &&
|
250
247
|
keyPressEvents.length === keyUpEvents.length
|
@@ -284,9 +281,8 @@ describe( 'Post Editor Performance', () => {
|
|
284
281
|
await page.tracing.stop();
|
285
282
|
|
286
283
|
traceResults = JSON.parse( readFile( traceFile ) );
|
287
|
-
const [ mouseOverEvents, mouseOutEvents ] =
|
288
|
-
traceResults
|
289
|
-
);
|
284
|
+
const [ mouseOverEvents, mouseOutEvents ] =
|
285
|
+
getHoverEventDurations( traceResults );
|
290
286
|
for ( let k = 0; k < mouseOverEvents.length; k++ ) {
|
291
287
|
results.inserterHover.push(
|
292
288
|
mouseOverEvents[ k ] + mouseOutEvents[ k ]
|
@@ -130,11 +130,8 @@ describe( 'Site Editor Performance', () => {
|
|
130
130
|
}
|
131
131
|
await page.tracing.stop();
|
132
132
|
const traceResults = JSON.parse( readFile( traceFile ) );
|
133
|
-
const [
|
134
|
-
|
135
|
-
keyPressEvents,
|
136
|
-
keyUpEvents,
|
137
|
-
] = getTypingEventDurations( traceResults );
|
133
|
+
const [ keyDownEvents, keyPressEvents, keyUpEvents ] =
|
134
|
+
getTypingEventDurations( traceResults );
|
138
135
|
|
139
136
|
for ( let j = 0; j < keyDownEvents.length; j++ ) {
|
140
137
|
results.type.push(
|
@@ -113,7 +113,8 @@ describe( 'Widgets screen', () => {
|
|
113
113
|
const insertionPointIndicator = await page.$(
|
114
114
|
'.block-editor-block-list__insertion-point-indicator'
|
115
115
|
);
|
116
|
-
const insertionPointIndicatorBoundingBox =
|
116
|
+
const insertionPointIndicatorBoundingBox =
|
117
|
+
await insertionPointIndicator.boundingBox();
|
117
118
|
|
118
119
|
expect(
|
119
120
|
insertionPointIndicatorBoundingBox.y > lastBlockBoundingBox.y
|
@@ -298,7 +299,8 @@ describe( 'Widgets screen', () => {
|
|
298
299
|
firstParagraphBlock
|
299
300
|
);
|
300
301
|
|
301
|
-
const secondParagraphBlockBoundingBox =
|
302
|
+
const secondParagraphBlockBoundingBox =
|
303
|
+
await secondParagraphBlock.boundingBox();
|
302
304
|
|
303
305
|
// Click outside the block to move the focus back to the widget area.
|
304
306
|
await page.mouse.click(
|
@@ -560,16 +562,18 @@ describe( 'Widgets screen', () => {
|
|
560
562
|
{},
|
561
563
|
firstParagraphBlock
|
562
564
|
);
|
563
|
-
const duplicatedParagraphBlock =
|
564
|
-
|
565
|
-
|
565
|
+
const duplicatedParagraphBlock =
|
566
|
+
await firstParagraphBlock.evaluateHandle(
|
567
|
+
( paragraph ) => paragraph.nextSibling
|
568
|
+
);
|
566
569
|
|
567
570
|
const firstParagraphBlockClientId = await firstParagraphBlock.evaluate(
|
568
571
|
( node ) => node.dataset.block
|
569
572
|
);
|
570
|
-
const duplicatedParagraphBlockClientId =
|
571
|
-
|
572
|
-
|
573
|
+
const duplicatedParagraphBlockClientId =
|
574
|
+
await duplicatedParagraphBlock.evaluate(
|
575
|
+
( node ) => node.dataset.block
|
576
|
+
);
|
573
577
|
|
574
578
|
expect( firstParagraphBlockClientId ).not.toBe(
|
575
579
|
duplicatedParagraphBlockClientId
|
@@ -1,33 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`Buttons can jump to the link editor using the keyboard shortcut 1`] = `
|
4
|
-
"<!-- wp:buttons -->
|
5
|
-
<div class=\\"wp-block-buttons\\"><!-- wp:button -->
|
6
|
-
<div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\" href=\\"https://www.wordpress.org/\\">WordPress</a></div>
|
7
|
-
<!-- /wp:button --></div>
|
8
|
-
<!-- /wp:buttons -->"
|
9
|
-
`;
|
10
|
-
|
11
|
-
exports[`Buttons dismisses link editor when escape is pressed 1`] = `
|
12
|
-
"<!-- wp:buttons -->
|
13
|
-
<div class=\\"wp-block-buttons\\"><!-- wp:button -->
|
14
|
-
<div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">WordPress</a></div>
|
15
|
-
<!-- /wp:button --></div>
|
16
|
-
<!-- /wp:buttons -->"
|
17
|
-
`;
|
18
|
-
|
19
|
-
exports[`Buttons has focus on button content (slash inserter) 1`] = `
|
20
|
-
"<!-- wp:buttons -->
|
21
|
-
<div class=\\"wp-block-buttons\\"><!-- wp:button -->
|
22
|
-
<div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">Content</a></div>
|
23
|
-
<!-- /wp:button --></div>
|
24
|
-
<!-- /wp:buttons -->"
|
25
|
-
`;
|
26
|
-
|
27
|
-
exports[`Buttons has focus on button content 1`] = `
|
28
|
-
"<!-- wp:buttons -->
|
29
|
-
<div class=\\"wp-block-buttons\\"><!-- wp:button -->
|
30
|
-
<div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">Content</a></div>
|
31
|
-
<!-- /wp:button --></div>
|
32
|
-
<!-- /wp:buttons -->"
|
33
|
-
`;
|
@@ -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
|
-
`;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`Spacer can be created by typing "/spacer" 1`] = `
|
4
|
-
"<!-- wp:spacer -->
|
5
|
-
<div style=\\"height:100px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>
|
6
|
-
<!-- /wp:spacer -->"
|
7
|
-
`;
|
8
|
-
|
9
|
-
exports[`Spacer can be resized using the drag handle and remains selected after being dragged 1`] = `
|
10
|
-
"<!-- wp:spacer {\\"height\\":\\"150px\\"} -->
|
11
|
-
<div style=\\"height:150px\\" aria-hidden=\\"true\\" class=\\"wp-block-spacer\\"></div>
|
12
|
-
<!-- /wp:spacer -->"
|
13
|
-
`;
|
@@ -1,61 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`Table allows a caption to be added 1`] = `
|
4
|
-
"<!-- wp:table -->
|
5
|
-
<figure class=\\"wp-block-table\\"><table><tbody><tr><td></td><td></td></tr><tr><td></td><td></td></tr></tbody></table><figcaption>Caption!</figcaption></figure>
|
6
|
-
<!-- /wp:table -->"
|
7
|
-
`;
|
8
|
-
|
9
|
-
exports[`Table allows adding and deleting columns across the table header, body and footer 1`] = `
|
10
|
-
"<!-- wp:table -->
|
11
|
-
<figure class=\\"wp-block-table\\"><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody><tfoot><tr><td></td><td></td><td></td></tr></tfoot></table></figure>
|
12
|
-
<!-- /wp:table -->"
|
13
|
-
`;
|
14
|
-
|
15
|
-
exports[`Table allows adding and deleting columns across the table header, body and footer 2`] = `
|
16
|
-
"<!-- wp:table -->
|
17
|
-
<figure class=\\"wp-block-table\\"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td></td><td></td></tr><tr><td></td><td></td></tr></tbody><tfoot><tr><td></td><td></td></tr></tfoot></table></figure>
|
18
|
-
<!-- /wp:table -->"
|
19
|
-
`;
|
20
|
-
|
21
|
-
exports[`Table allows cells to be selected when the cell area outside of the RichText is clicked 1`] = `
|
22
|
-
"<!-- wp:table {\\"hasFixedLayout\\":true} -->
|
23
|
-
<figure class=\\"wp-block-table\\"><table class=\\"has-fixed-layout\\"><tbody><tr><td><br><br><br><br></td><td>Second cell.</td></tr><tr><td></td><td></td></tr></tbody></table></figure>
|
24
|
-
<!-- /wp:table -->"
|
25
|
-
`;
|
26
|
-
|
27
|
-
exports[`Table allows columns to be aligned 1`] = `
|
28
|
-
"<!-- wp:table -->
|
29
|
-
<figure class=\\"wp-block-table\\"><table><tbody><tr><td>None</td><td class=\\"has-text-align-left\\" data-align=\\"left\\">To the left</td><td class=\\"has-text-align-center\\" data-align=\\"center\\">Centered</td><td class=\\"has-text-align-right\\" data-align=\\"right\\">Right aligned</td></tr><tr><td></td><td class=\\"has-text-align-left\\" data-align=\\"left\\"></td><td class=\\"has-text-align-center\\" data-align=\\"center\\"></td><td class=\\"has-text-align-right\\" data-align=\\"right\\"></td></tr></tbody></table></figure>
|
30
|
-
<!-- /wp:table -->"
|
31
|
-
`;
|
32
|
-
|
33
|
-
exports[`Table allows header and footer rows to be switched on and off 1`] = `
|
34
|
-
"<!-- wp:table -->
|
35
|
-
<figure class=\\"wp-block-table\\"><table><thead><tr><th>header</th><th></th></tr></thead><tbody><tr><td>body</td><td></td></tr><tr><td></td><td></td></tr></tbody><tfoot><tr><td>footer</td><td></td></tr></tfoot></table></figure>
|
36
|
-
<!-- /wp:table -->"
|
37
|
-
`;
|
38
|
-
|
39
|
-
exports[`Table allows header and footer rows to be switched on and off 2`] = `
|
40
|
-
"<!-- wp:table -->
|
41
|
-
<figure class=\\"wp-block-table\\"><table><tbody><tr><td>body</td><td></td></tr><tr><td></td><td></td></tr></tbody></table></figure>
|
42
|
-
<!-- /wp:table -->"
|
43
|
-
`;
|
44
|
-
|
45
|
-
exports[`Table allows text to by typed into cells 1`] = `
|
46
|
-
"<!-- wp:table -->
|
47
|
-
<figure class=\\"wp-block-table\\"><table><tbody><tr><td>This</td><td>is</td></tr><tr><td>table</td><td>block</td></tr></tbody></table></figure>
|
48
|
-
<!-- /wp:table -->"
|
49
|
-
`;
|
50
|
-
|
51
|
-
exports[`Table displays a form for choosing the row and column count of the table 1`] = `
|
52
|
-
"<!-- wp:table -->
|
53
|
-
<figure class=\\"wp-block-table\\"><table><tbody><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr></tbody></table></figure>
|
54
|
-
<!-- /wp:table -->"
|
55
|
-
`;
|
56
|
-
|
57
|
-
exports[`Table up and down arrow navigation 1`] = `
|
58
|
-
"<!-- wp:table -->
|
59
|
-
<figure class=\\"wp-block-table\\"><table><tbody><tr><td>1</td><td>4</td></tr><tr><td>2</td><td>3</td></tr></tbody></table></figure>
|
60
|
-
<!-- /wp:table -->"
|
61
|
-
`;
|