@wordpress/e2e-tests 5.6.0 → 6.1.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 +8 -0
- package/assets/small-post-with-containers.html +77 -0
- package/config/performance-reporter.js +22 -6
- package/config/setup-performance-test.js +3 -0
- package/package.json +9 -9
- package/plugins/inner-blocks-templates/index.js +29 -0
- package/specs/editor/blocks/__snapshots__/heading.test.js.snap +7 -7
- package/specs/editor/blocks/heading.test.js +1 -1
- package/specs/editor/plugins/block-directory-add.test.js +1 -1
- package/specs/editor/various/__snapshots__/block-grouping.test.js.snap +4 -4
- package/specs/editor/various/__snapshots__/inserting-blocks.test.js.snap +2 -2
- package/specs/editor/various/__snapshots__/keep-styles-on-block-transforms.test.js.snap +3 -3
- package/specs/editor/various/__snapshots__/list-view.test.js.snap +1 -1
- package/specs/editor/various/__snapshots__/multi-block-selection.test.js.snap +4 -4
- package/specs/editor/various/__snapshots__/rich-text.test.js.snap +1 -1
- package/specs/editor/various/a11y.test.js +3 -1
- package/specs/editor/various/block-hierarchy-navigation.test.js +2 -4
- package/specs/editor/various/block-switcher.test.js +14 -13
- package/specs/editor/various/editor-modes.test.js +3 -7
- package/specs/editor/various/keyboard-navigable-blocks.test.js +7 -0
- package/specs/editor/various/multi-block-selection.test.js +1 -1
- package/specs/editor/various/reusable-blocks.test.js +2 -2
- package/specs/editor/various/sidebar.test.js +0 -2
- package/specs/experiments/blocks/post-comments-form.test.js +7 -8
- package/specs/performance/post-editor.test.js +98 -44
- package/specs/performance/site-editor.test.js +3 -0
- package/specs/site-editor/global-styles-sidebar.test.js +2 -0
- package/specs/site-editor/multi-entity-saving.test.js +18 -12
- package/specs/site-editor/settings-sidebar.test.js +3 -0
- package/specs/site-editor/site-editor-export.test.js +2 -0
- package/specs/editor/blocks/__snapshots__/quote.test.js.snap +0 -123
- package/specs/editor/blocks/quote.test.js +0 -199
- package/specs/editor/various/font-size-picker.test.js +0 -314
- package/specs/editor/various/toolbar-roving-tabindex.test.js +0 -142
- package/specs/site-editor/multi-entity-editing.test.js +0 -309
@@ -6,8 +6,7 @@ import {
|
|
6
6
|
activateTheme,
|
7
7
|
setOption,
|
8
8
|
visitSiteEditor,
|
9
|
-
|
10
|
-
navigateSiteEditorBackToRoot,
|
9
|
+
enterEditMode,
|
11
10
|
deleteAllTemplates,
|
12
11
|
canvas,
|
13
12
|
} from '@wordpress/e2e-test-utils';
|
@@ -24,15 +23,15 @@ describe( 'Post Comments Form', () => {
|
|
24
23
|
|
25
24
|
// Navigate to "Singular" post template
|
26
25
|
await visitSiteEditor();
|
27
|
-
await openSiteEditorNavigationPanel();
|
28
|
-
await navigateSiteEditorBackToRoot();
|
29
26
|
await expect( page ).toClick(
|
30
|
-
'.
|
27
|
+
'.edit-site-sidebar-navigation-item',
|
31
28
|
{ text: /templates/i }
|
32
29
|
);
|
33
|
-
await expect( page ).toClick(
|
34
|
-
|
35
|
-
|
30
|
+
await expect( page ).toClick(
|
31
|
+
'.edit-site-sidebar-navigation-item',
|
32
|
+
{ text: /singular/i }
|
33
|
+
);
|
34
|
+
await enterEditMode();
|
36
35
|
|
37
36
|
// Insert post comments form
|
38
37
|
await insertBlock( 'Post Comments Form' );
|
@@ -15,6 +15,7 @@ import {
|
|
15
15
|
closeGlobalBlockInserter,
|
16
16
|
openListView,
|
17
17
|
closeListView,
|
18
|
+
canvas,
|
18
19
|
} from '@wordpress/e2e-test-utils';
|
19
20
|
|
20
21
|
/**
|
@@ -32,6 +33,34 @@ import {
|
|
32
33
|
|
33
34
|
jest.setTimeout( 1000000 );
|
34
35
|
|
36
|
+
async function loadHtmlIntoTheBlockEditor( html ) {
|
37
|
+
await page.evaluate( ( _html ) => {
|
38
|
+
const { parse } = window.wp.blocks;
|
39
|
+
const { dispatch } = window.wp.data;
|
40
|
+
const blocks = parse( _html );
|
41
|
+
|
42
|
+
blocks.forEach( ( block ) => {
|
43
|
+
if ( block.name === 'core/image' ) {
|
44
|
+
delete block.attributes.id;
|
45
|
+
delete block.attributes.url;
|
46
|
+
}
|
47
|
+
} );
|
48
|
+
|
49
|
+
dispatch( 'core/block-editor' ).resetBlocks( blocks );
|
50
|
+
}, html );
|
51
|
+
}
|
52
|
+
|
53
|
+
async function load1000Paragraphs() {
|
54
|
+
await page.evaluate( () => {
|
55
|
+
const { createBlock } = window.wp.blocks;
|
56
|
+
const { dispatch } = window.wp.data;
|
57
|
+
const blocks = Array.from( { length: 1000 } ).map( () =>
|
58
|
+
createBlock( 'core/paragraph' )
|
59
|
+
);
|
60
|
+
dispatch( 'core/block-editor' ).resetBlocks( blocks );
|
61
|
+
} );
|
62
|
+
}
|
63
|
+
|
35
64
|
describe( 'Post Editor Performance', () => {
|
36
65
|
const results = {
|
37
66
|
serverResponse: [],
|
@@ -41,6 +70,7 @@ describe( 'Post Editor Performance', () => {
|
|
41
70
|
firstContentfulPaint: [],
|
42
71
|
firstBlock: [],
|
43
72
|
type: [],
|
73
|
+
typeContainer: [],
|
44
74
|
focus: [],
|
45
75
|
listViewOpen: [],
|
46
76
|
inserterOpen: [],
|
@@ -50,29 +80,6 @@ describe( 'Post Editor Performance', () => {
|
|
50
80
|
const traceFile = __dirname + '/trace.json';
|
51
81
|
let traceResults;
|
52
82
|
|
53
|
-
beforeAll( async () => {
|
54
|
-
const html = readFile(
|
55
|
-
join( __dirname, '../../assets/large-post.html' )
|
56
|
-
);
|
57
|
-
|
58
|
-
await createNewPost();
|
59
|
-
await page.evaluate( ( _html ) => {
|
60
|
-
const { parse } = window.wp.blocks;
|
61
|
-
const { dispatch } = window.wp.data;
|
62
|
-
const blocks = parse( _html );
|
63
|
-
|
64
|
-
blocks.forEach( ( block ) => {
|
65
|
-
if ( block.name === 'core/image' ) {
|
66
|
-
delete block.attributes.id;
|
67
|
-
delete block.attributes.url;
|
68
|
-
}
|
69
|
-
} );
|
70
|
-
|
71
|
-
dispatch( 'core/block-editor' ).resetBlocks( blocks );
|
72
|
-
}, html );
|
73
|
-
await saveDraft();
|
74
|
-
} );
|
75
|
-
|
76
83
|
afterAll( async () => {
|
77
84
|
const resultsFilename = basename( __filename, '.js' ) + '.results.json';
|
78
85
|
writeFileSync(
|
@@ -83,6 +90,7 @@ describe( 'Post Editor Performance', () => {
|
|
83
90
|
} );
|
84
91
|
|
85
92
|
beforeEach( async () => {
|
93
|
+
await createNewPost();
|
86
94
|
// Disable auto-save to avoid impacting the metrics.
|
87
95
|
await page.evaluate( () => {
|
88
96
|
window.wp.data.dispatch( 'core/editor' ).updateEditorSettings( {
|
@@ -93,11 +101,17 @@ describe( 'Post Editor Performance', () => {
|
|
93
101
|
} );
|
94
102
|
|
95
103
|
it( 'Loading', async () => {
|
96
|
-
|
104
|
+
await loadHtmlIntoTheBlockEditor(
|
105
|
+
readFile( join( __dirname, '../../assets/large-post.html' ) )
|
106
|
+
);
|
107
|
+
await saveDraft();
|
97
108
|
let i = 5;
|
98
109
|
while ( i-- ) {
|
99
110
|
await page.reload();
|
100
|
-
await page.waitForSelector( '.
|
111
|
+
await page.waitForSelector( '.edit-post-layout', {
|
112
|
+
timeout: 120000,
|
113
|
+
} );
|
114
|
+
await canvas().waitForSelector( '.wp-block', { timeout: 120000 } );
|
101
115
|
const {
|
102
116
|
serverResponse,
|
103
117
|
firstPaint,
|
@@ -117,7 +131,9 @@ describe( 'Post Editor Performance', () => {
|
|
117
131
|
} );
|
118
132
|
|
119
133
|
it( 'Typing', async () => {
|
120
|
-
|
134
|
+
await loadHtmlIntoTheBlockEditor(
|
135
|
+
readFile( join( __dirname, '../../assets/large-post.html' ) )
|
136
|
+
);
|
121
137
|
await insertBlock( 'Paragraph' );
|
122
138
|
let i = 20;
|
123
139
|
await page.tracing.start( {
|
@@ -151,18 +167,59 @@ describe( 'Post Editor Performance', () => {
|
|
151
167
|
}
|
152
168
|
} );
|
153
169
|
|
154
|
-
it( '
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
170
|
+
it( 'Typing within containers', async () => {
|
171
|
+
await loadHtmlIntoTheBlockEditor(
|
172
|
+
readFile(
|
173
|
+
join(
|
174
|
+
__dirname,
|
175
|
+
'../../assets/small-post-with-containers.html'
|
176
|
+
)
|
177
|
+
)
|
178
|
+
);
|
179
|
+
// Select the block where we type in
|
180
|
+
await canvas().waitForSelector( 'p[aria-label="Paragraph block"]' );
|
181
|
+
await canvas().click( 'p[aria-label="Paragraph block"]' );
|
182
|
+
// Ignore firsted typed character because it's different
|
183
|
+
// It probably deserves a dedicated metric.
|
184
|
+
// (isTyping triggers so it's slower)
|
185
|
+
await page.keyboard.type( 'x' );
|
186
|
+
|
187
|
+
let i = 10;
|
188
|
+
await page.tracing.start( {
|
189
|
+
path: traceFile,
|
190
|
+
screenshots: false,
|
191
|
+
categories: [ 'devtools.timeline' ],
|
164
192
|
} );
|
165
|
-
|
193
|
+
|
194
|
+
while ( i-- ) {
|
195
|
+
// Wait for the browser to be idle before starting the monitoring.
|
196
|
+
// eslint-disable-next-line no-restricted-syntax
|
197
|
+
await page.waitForTimeout( 500 );
|
198
|
+
await page.keyboard.type( 'x' );
|
199
|
+
}
|
200
|
+
// eslint-disable-next-line no-restricted-syntax
|
201
|
+
await page.waitForTimeout( 500 );
|
202
|
+
await page.tracing.stop();
|
203
|
+
traceResults = JSON.parse( readFile( traceFile ) );
|
204
|
+
const [ keyDownEvents, keyPressEvents, keyUpEvents ] =
|
205
|
+
getTypingEventDurations( traceResults );
|
206
|
+
if (
|
207
|
+
keyDownEvents.length === keyPressEvents.length &&
|
208
|
+
keyPressEvents.length === keyUpEvents.length
|
209
|
+
) {
|
210
|
+
// The first character typed triggers a longer time (isTyping change)
|
211
|
+
// It can impact the stability of the metric, so we exclude it.
|
212
|
+
for ( let j = 1; j < keyDownEvents.length; j++ ) {
|
213
|
+
results.typeContainer.push(
|
214
|
+
keyDownEvents[ j ] + keyPressEvents[ j ] + keyUpEvents[ j ]
|
215
|
+
);
|
216
|
+
}
|
217
|
+
}
|
218
|
+
} );
|
219
|
+
|
220
|
+
it( 'Selecting blocks', async () => {
|
221
|
+
await load1000Paragraphs();
|
222
|
+
const paragraphs = await canvas().$$( '.wp-block' );
|
166
223
|
await page.tracing.start( {
|
167
224
|
path: traceFile,
|
168
225
|
screenshots: false,
|
@@ -182,8 +239,7 @@ describe( 'Post Editor Performance', () => {
|
|
182
239
|
} );
|
183
240
|
|
184
241
|
it( 'Opening persistent list view', async () => {
|
185
|
-
|
186
|
-
await page.waitForSelector( '.edit-post-layout' );
|
242
|
+
await load1000Paragraphs();
|
187
243
|
for ( let j = 0; j < 10; j++ ) {
|
188
244
|
await page.tracing.start( {
|
189
245
|
path: traceFile,
|
@@ -202,8 +258,7 @@ describe( 'Post Editor Performance', () => {
|
|
202
258
|
} );
|
203
259
|
|
204
260
|
it( 'Opening the inserter', async () => {
|
205
|
-
|
206
|
-
await page.waitForSelector( '.edit-post-layout' );
|
261
|
+
await load1000Paragraphs();
|
207
262
|
for ( let j = 0; j < 10; j++ ) {
|
208
263
|
await page.tracing.start( {
|
209
264
|
path: traceFile,
|
@@ -225,8 +280,7 @@ describe( 'Post Editor Performance', () => {
|
|
225
280
|
function sum( arr ) {
|
226
281
|
return arr.reduce( ( a, b ) => a + b, 0 );
|
227
282
|
}
|
228
|
-
|
229
|
-
// Measure time to search the inserter and get results.
|
283
|
+
await load1000Paragraphs();
|
230
284
|
await openGlobalBlockInserter();
|
231
285
|
for ( let j = 0; j < 10; j++ ) {
|
232
286
|
// Wait for the browser to be idle before starting the monitoring.
|
@@ -258,7 +312,7 @@ describe( 'Post Editor Performance', () => {
|
|
258
312
|
} );
|
259
313
|
|
260
314
|
it( 'Hovering Inserter Items', async () => {
|
261
|
-
|
315
|
+
await load1000Paragraphs();
|
262
316
|
const paragraphBlockItem =
|
263
317
|
'.block-editor-inserter__menu .editor-block-list-item-paragraph';
|
264
318
|
const headingBlockItem =
|
@@ -15,6 +15,7 @@ import {
|
|
15
15
|
saveDraft,
|
16
16
|
insertBlock,
|
17
17
|
deleteAllTemplates,
|
18
|
+
enterEditMode,
|
18
19
|
} from '@wordpress/e2e-test-utils';
|
19
20
|
|
20
21
|
/**
|
@@ -50,6 +51,7 @@ describe( 'Site Editor Performance', () => {
|
|
50
51
|
firstContentfulPaint: [],
|
51
52
|
firstBlock: [],
|
52
53
|
type: [],
|
54
|
+
typeContainer: [],
|
53
55
|
focus: [],
|
54
56
|
inserterOpen: [],
|
55
57
|
inserterHover: [],
|
@@ -114,6 +116,7 @@ describe( 'Site Editor Performance', () => {
|
|
114
116
|
await canvas().waitForSelector(
|
115
117
|
'[data-type="core/post-content"] [data-type="core/paragraph"]'
|
116
118
|
);
|
119
|
+
await enterEditMode();
|
117
120
|
await canvas().click(
|
118
121
|
'[data-type="core/post-content"] [data-type="core/paragraph"]'
|
119
122
|
);
|
@@ -5,6 +5,7 @@ import {
|
|
5
5
|
deleteAllTemplates,
|
6
6
|
activateTheme,
|
7
7
|
visitSiteEditor,
|
8
|
+
enterEditMode,
|
8
9
|
toggleGlobalStyles,
|
9
10
|
openGlobalStylesPanel,
|
10
11
|
} from '@wordpress/e2e-test-utils';
|
@@ -26,6 +27,7 @@ describe( 'Global styles sidebar', () => {
|
|
26
27
|
} );
|
27
28
|
beforeEach( async () => {
|
28
29
|
await visitSiteEditor();
|
30
|
+
await enterEditMode();
|
29
31
|
} );
|
30
32
|
describe( 'blocks list', () => {
|
31
33
|
it( 'should filter results properly', async () => {
|
@@ -13,7 +13,9 @@ import {
|
|
13
13
|
clickButton,
|
14
14
|
createReusableBlock,
|
15
15
|
visitSiteEditor,
|
16
|
+
enterEditMode,
|
16
17
|
deleteAllTemplates,
|
18
|
+
canvas,
|
17
19
|
} from '@wordpress/e2e-test-utils';
|
18
20
|
|
19
21
|
describe( 'Multi-entity save flow', () => {
|
@@ -93,8 +95,8 @@ describe( 'Multi-entity save flow', () => {
|
|
93
95
|
it( 'Save flow should work as expected.', async () => {
|
94
96
|
await createNewPost();
|
95
97
|
// Edit the page some.
|
96
|
-
await
|
97
|
-
await
|
98
|
+
await canvas().waitForSelector( '.editor-post-title' );
|
99
|
+
await canvas().click( '.editor-post-title' );
|
98
100
|
await page.keyboard.type( 'Test Post...' );
|
99
101
|
await page.keyboard.press( 'Enter' );
|
100
102
|
|
@@ -109,8 +111,8 @@ describe( 'Multi-entity save flow', () => {
|
|
109
111
|
|
110
112
|
// Add a reusable block and edit it.
|
111
113
|
await createReusableBlock( 'Hi!', 'Test' );
|
112
|
-
await
|
113
|
-
await
|
114
|
+
await canvas().waitForSelector( 'p[data-type="core/paragraph"]' );
|
115
|
+
await canvas().click( 'p[data-type="core/paragraph"]' );
|
114
116
|
await page.keyboard.type( 'Oh!' );
|
115
117
|
|
116
118
|
// Should trigger multi-entity save button once template part edited.
|
@@ -168,7 +170,7 @@ describe( 'Multi-entity save flow', () => {
|
|
168
170
|
} );
|
169
171
|
|
170
172
|
// Update the post.
|
171
|
-
await
|
173
|
+
await canvas().click( '.editor-post-title' );
|
172
174
|
await page.keyboard.type( '...more title!' );
|
173
175
|
|
174
176
|
// Verify update button is enabled.
|
@@ -181,9 +183,9 @@ describe( 'Multi-entity save flow', () => {
|
|
181
183
|
await assertExistence( saveA11ySelector, false );
|
182
184
|
|
183
185
|
// Update reusable block again.
|
184
|
-
await
|
186
|
+
await canvas().click( 'p[data-type="core/paragraph"]' );
|
185
187
|
// We need to click again due to the clickthrough overlays in reusable blocks.
|
186
|
-
await
|
188
|
+
await canvas().click( 'p[data-type="core/paragraph"]' );
|
187
189
|
await page.keyboard.type( 'R!' );
|
188
190
|
|
189
191
|
// Multi-entity saving should be enabled.
|
@@ -202,19 +204,19 @@ describe( 'Multi-entity save flow', () => {
|
|
202
204
|
);
|
203
205
|
const editableSiteTitleSelector =
|
204
206
|
'.wp-block-site-title a[contenteditable="true"]';
|
205
|
-
await
|
206
|
-
await
|
207
|
+
await canvas().waitForSelector( editableSiteTitleSelector );
|
208
|
+
await canvas().focus( editableSiteTitleSelector );
|
207
209
|
await page.keyboard.type( '...' );
|
208
210
|
|
209
211
|
await insertBlock( 'Site Tagline' );
|
210
212
|
// Wait for the placeholder.
|
211
|
-
await
|
213
|
+
await canvas().waitForXPath(
|
212
214
|
'//span[@data-rich-text-placeholder="Write site tagline…"]'
|
213
215
|
);
|
214
216
|
const editableSiteTagLineSelector =
|
215
217
|
'.wp-block-site-tagline[contenteditable="true"]';
|
216
|
-
await
|
217
|
-
await
|
218
|
+
await canvas().waitForSelector( editableSiteTagLineSelector );
|
219
|
+
await canvas().focus( editableSiteTagLineSelector );
|
218
220
|
await page.keyboard.type( 'Just another WordPress site' );
|
219
221
|
|
220
222
|
await clickButton( 'Publish' );
|
@@ -265,6 +267,8 @@ describe( 'Multi-entity save flow', () => {
|
|
265
267
|
postType: 'wp_template',
|
266
268
|
} );
|
267
269
|
|
270
|
+
await enterEditMode();
|
271
|
+
|
268
272
|
// Select the header template part via list view.
|
269
273
|
await page.click( '.edit-site-header-edit-mode__list-view-toggle' );
|
270
274
|
const headerTemplatePartListViewButton = await page.waitForXPath(
|
@@ -302,6 +306,8 @@ describe( 'Multi-entity save flow', () => {
|
|
302
306
|
postType: 'wp_template',
|
303
307
|
} );
|
304
308
|
|
309
|
+
await enterEditMode();
|
310
|
+
|
305
311
|
// Insert a paragraph at the bottom.
|
306
312
|
await insertBlock( 'Paragraph' );
|
307
313
|
|
@@ -8,6 +8,7 @@ import {
|
|
8
8
|
selectBlockByClientId,
|
9
9
|
insertBlock,
|
10
10
|
visitSiteEditor,
|
11
|
+
enterEditMode,
|
11
12
|
} from '@wordpress/e2e-test-utils';
|
12
13
|
|
13
14
|
async function toggleSidebar() {
|
@@ -49,6 +50,7 @@ describe( 'Settings sidebar', () => {
|
|
49
50
|
} );
|
50
51
|
beforeEach( async () => {
|
51
52
|
await visitSiteEditor();
|
53
|
+
await enterEditMode();
|
52
54
|
} );
|
53
55
|
|
54
56
|
describe( 'Template tab', () => {
|
@@ -68,6 +70,7 @@ describe( 'Settings sidebar', () => {
|
|
68
70
|
postId: 'emptytheme//singular',
|
69
71
|
postType: 'wp_template',
|
70
72
|
} );
|
73
|
+
await enterEditMode();
|
71
74
|
const templateCardAfterNavigation = await getTemplateCard();
|
72
75
|
|
73
76
|
expect( templateCardBeforeNavigation ).toMatchObject( {
|
@@ -12,6 +12,7 @@ import {
|
|
12
12
|
deleteAllTemplates,
|
13
13
|
activateTheme,
|
14
14
|
visitSiteEditor,
|
15
|
+
enterEditMode,
|
15
16
|
clickOnMoreMenuItem,
|
16
17
|
} from '@wordpress/e2e-test-utils';
|
17
18
|
|
@@ -41,6 +42,7 @@ describe( 'Site Editor Templates Export', () => {
|
|
41
42
|
|
42
43
|
beforeEach( async () => {
|
43
44
|
await visitSiteEditor();
|
45
|
+
await enterEditMode();
|
44
46
|
} );
|
45
47
|
|
46
48
|
it( 'clicking export should download emptytheme.zip file', async () => {
|
@@ -1,123 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`Quote can be converted to a pullquote 1`] = `
|
4
|
-
"<!-- wp:pullquote -->
|
5
|
-
<figure class=\\"wp-block-pullquote\\"><blockquote><p>one<br>two</p><cite>cite</cite></blockquote></figure>
|
6
|
-
<!-- /wp:pullquote -->"
|
7
|
-
`;
|
8
|
-
|
9
|
-
exports[`Quote can be converted to paragraphs and renders a paragraph for the cite, if it exists 1`] = `
|
10
|
-
"<!-- wp:paragraph -->
|
11
|
-
<p>one</p>
|
12
|
-
<!-- /wp:paragraph -->
|
13
|
-
|
14
|
-
<!-- wp:paragraph -->
|
15
|
-
<p>two</p>
|
16
|
-
<!-- /wp:paragraph -->
|
17
|
-
|
18
|
-
<!-- wp:paragraph -->
|
19
|
-
<p>cite</p>
|
20
|
-
<!-- /wp:paragraph -->"
|
21
|
-
`;
|
22
|
-
|
23
|
-
exports[`Quote can be converted to paragraphs and renders a void paragraph if both the cite and quote are void 1`] = `""`;
|
24
|
-
|
25
|
-
exports[`Quote can be converted to paragraphs and renders one paragraph block per <p> within quote 1`] = `
|
26
|
-
"<!-- wp:paragraph -->
|
27
|
-
<p>one</p>
|
28
|
-
<!-- /wp:paragraph -->
|
29
|
-
|
30
|
-
<!-- wp:paragraph -->
|
31
|
-
<p>two</p>
|
32
|
-
<!-- /wp:paragraph -->"
|
33
|
-
`;
|
34
|
-
|
35
|
-
exports[`Quote can be converted to paragraphs and renders only one paragraph for the cite, if the quote is void 1`] = `
|
36
|
-
"<!-- wp:paragraph -->
|
37
|
-
<p></p>
|
38
|
-
<!-- /wp:paragraph -->
|
39
|
-
|
40
|
-
<!-- wp:paragraph -->
|
41
|
-
<p>cite</p>
|
42
|
-
<!-- /wp:paragraph -->"
|
43
|
-
`;
|
44
|
-
|
45
|
-
exports[`Quote can be created by converting a heading 1`] = `
|
46
|
-
"<!-- wp:quote -->
|
47
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:heading -->
|
48
|
-
<h2>test</h2>
|
49
|
-
<!-- /wp:heading --></blockquote>
|
50
|
-
<!-- /wp:quote -->"
|
51
|
-
`;
|
52
|
-
|
53
|
-
exports[`Quote can be created by converting a paragraph 1`] = `
|
54
|
-
"<!-- wp:quote -->
|
55
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
56
|
-
<p>test</p>
|
57
|
-
<!-- /wp:paragraph --></blockquote>
|
58
|
-
<!-- /wp:quote -->"
|
59
|
-
`;
|
60
|
-
|
61
|
-
exports[`Quote can be created by converting multiple paragraphs 1`] = `
|
62
|
-
"<!-- wp:quote -->
|
63
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
64
|
-
<p>one</p>
|
65
|
-
<!-- /wp:paragraph -->
|
66
|
-
|
67
|
-
<!-- wp:paragraph -->
|
68
|
-
<p>two</p>
|
69
|
-
<!-- /wp:paragraph --></blockquote>
|
70
|
-
<!-- /wp:quote -->"
|
71
|
-
`;
|
72
|
-
|
73
|
-
exports[`Quote can be created by typing "/quote" 1`] = `
|
74
|
-
"<!-- wp:quote -->
|
75
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
76
|
-
<p>I’m a quote</p>
|
77
|
-
<!-- /wp:paragraph --></blockquote>
|
78
|
-
<!-- /wp:quote -->"
|
79
|
-
`;
|
80
|
-
|
81
|
-
exports[`Quote can be created by typing > in front of text of a paragraph block 1`] = `
|
82
|
-
"<!-- wp:quote -->
|
83
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
84
|
-
<p>test</p>
|
85
|
-
<!-- /wp:paragraph --></blockquote>
|
86
|
-
<!-- /wp:quote -->"
|
87
|
-
`;
|
88
|
-
|
89
|
-
exports[`Quote can be created by using > at the start of a paragraph block 1`] = `
|
90
|
-
"<!-- wp:quote -->
|
91
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
92
|
-
<p>A quote</p>
|
93
|
-
<!-- /wp:paragraph -->
|
94
|
-
|
95
|
-
<!-- wp:paragraph -->
|
96
|
-
<p>Another paragraph</p>
|
97
|
-
<!-- /wp:paragraph --></blockquote>
|
98
|
-
<!-- /wp:quote -->"
|
99
|
-
`;
|
100
|
-
|
101
|
-
exports[`Quote can be split at the end 1`] = `
|
102
|
-
"<!-- wp:quote -->
|
103
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
104
|
-
<p>1</p>
|
105
|
-
<!-- /wp:paragraph --></blockquote>
|
106
|
-
<!-- /wp:quote -->
|
107
|
-
|
108
|
-
<!-- wp:paragraph -->
|
109
|
-
<p></p>
|
110
|
-
<!-- /wp:paragraph -->"
|
111
|
-
`;
|
112
|
-
|
113
|
-
exports[`Quote can be split at the end 2`] = `
|
114
|
-
"<!-- wp:quote -->
|
115
|
-
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
116
|
-
<p>1</p>
|
117
|
-
<!-- /wp:paragraph -->
|
118
|
-
|
119
|
-
<!-- wp:paragraph -->
|
120
|
-
<p>2</p>
|
121
|
-
<!-- /wp:paragraph --></blockquote>
|
122
|
-
<!-- /wp:quote -->"
|
123
|
-
`;
|