@wordpress/e2e-tests 2.5.14 → 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.
Files changed (50) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE.md +1 -1
  3. package/config/flaky-tests-reporter.js +2 -1
  4. package/package.json +12 -11
  5. package/plugins/query-block.php +2 -2
  6. package/specs/editor/blocks/__snapshots__/heading.test.js.snap +2 -2
  7. package/specs/editor/blocks/__snapshots__/navigation.test.js.snap +29 -57
  8. package/specs/editor/blocks/__snapshots__/spacer.test.js.snap +1 -1
  9. package/specs/editor/blocks/classic.test.js +5 -2
  10. package/specs/editor/blocks/columns.test.js +1 -1
  11. package/specs/editor/blocks/cover.test.js +1 -1
  12. package/specs/editor/blocks/heading.test.js +15 -3
  13. package/specs/editor/blocks/image.test.js +1 -2
  14. package/specs/editor/blocks/navigation.test.js +311 -439
  15. package/specs/editor/blocks/preformatted.test.js +2 -1
  16. package/specs/editor/blocks/site-title.test.js +2 -31
  17. package/specs/editor/fixtures/menu-items-request-fixture.json +84 -0
  18. package/specs/editor/fixtures/menu-items-response-fixture.json +240 -144
  19. package/specs/editor/plugins/block-variations.test.js +1 -1
  20. package/specs/editor/plugins/custom-post-types.test.js +4 -3
  21. package/specs/editor/plugins/iframed-inline-styles.test.js +0 -6
  22. package/specs/editor/plugins/iframed-multiple-block-stylesheets.test.js +0 -4
  23. package/specs/editor/various/__snapshots__/block-editor-keyboard-shortcuts.test.js.snap +38 -24
  24. package/specs/editor/various/adding-patterns.test.js +1 -1
  25. package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +43 -3
  26. package/specs/editor/various/block-grouping.test.js +2 -18
  27. package/specs/editor/various/block-hierarchy-navigation.test.js +3 -3
  28. package/specs/editor/various/change-detection.test.js +5 -0
  29. package/specs/editor/various/editor-modes.test.js +7 -0
  30. package/specs/editor/various/font-size-picker.test.js +58 -18
  31. package/specs/editor/various/inserting-blocks.test.js +6 -2
  32. package/specs/editor/various/keyboard-navigable-blocks.test.js +6 -0
  33. package/specs/editor/various/list-view.test.js +2 -2
  34. package/specs/editor/various/navigable-toolbar.test.js +2 -2
  35. package/specs/editor/various/post-editor-template-mode.test.js +1 -1
  36. package/specs/editor/various/preview.test.js +67 -2
  37. package/specs/editor/various/reusable-blocks.test.js +53 -31
  38. package/specs/editor/various/undo.test.js +21 -0
  39. package/specs/editor/various/writing-flow.test.js +8 -4
  40. package/specs/performance/site-editor.test.js +1 -1
  41. package/specs/site-editor/document-settings.test.js +5 -5
  42. package/specs/site-editor/multi-entity-editing.test.js +2 -2
  43. package/specs/site-editor/multi-entity-saving.test.js +95 -57
  44. package/specs/site-editor/settings-sidebar.test.js +4 -4
  45. package/specs/site-editor/site-editor-export.test.js +1 -1
  46. package/specs/site-editor/site-editor-inserter.test.js +1 -1
  47. package/specs/site-editor/template-part.test.js +95 -79
  48. package/specs/site-editor/template-revert.test.js +13 -9
  49. package/specs/widgets/customizing-widgets.test.js +7 -23
  50. package/specs/widgets/editing-widgets.test.js +36 -12
@@ -2,9 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- createNewPost,
6
5
  insertBlock,
7
- disablePrePublishChecks,
8
6
  trashAllPosts,
9
7
  activateTheme,
10
8
  getAllBlocks,
@@ -23,7 +21,7 @@ const templatePartNameInput =
23
21
 
24
22
  describe( 'Template Part', () => {
25
23
  beforeAll( async () => {
26
- await activateTheme( 'tt1-blocks' );
24
+ await activateTheme( 'emptytheme' );
27
25
  await trashAllPosts( 'wp_template' );
28
26
  await trashAllPosts( 'wp_template_part' );
29
27
  } );
@@ -42,7 +40,7 @@ describe( 'Template Part', () => {
42
40
  async function navigateToHeader() {
43
41
  // Switch to editing the header template part.
44
42
  await siteEditor.visit( {
45
- postId: 'tt1-blocks//header',
43
+ postId: 'emptytheme//header',
46
44
  postType: 'wp_template_part',
47
45
  } );
48
46
  }
@@ -63,7 +61,7 @@ describe( 'Template Part', () => {
63
61
 
64
62
  // Switch back to the Index template.
65
63
  await siteEditor.visit( {
66
- postId: 'tt1-blocks//index',
64
+ postId: 'emptytheme//index',
67
65
  postType: 'wp_template',
68
66
  } );
69
67
  }
@@ -95,12 +93,9 @@ describe( 'Template Part', () => {
95
93
  expect( paragraphInTemplatePart ).not.toBeNull();
96
94
  }
97
95
 
98
- async function awaitHeaderAndFooterLoad() {
96
+ async function awaitHeaderLoad() {
99
97
  await canvas().waitForSelector(
100
- '.wp-block-template-part.site-header.block-editor-block-list__layout'
101
- );
102
- await canvas().waitForSelector(
103
- '.wp-block-template-part.site-footer.block-editor-block-list__layout'
98
+ 'header.wp-block-template-part.block-editor-block-list__layout'
104
99
  );
105
100
  }
106
101
 
@@ -174,7 +169,7 @@ describe( 'Template Part', () => {
174
169
  } );
175
170
 
176
171
  it( 'Should convert selected block to template part', async () => {
177
- await awaitHeaderAndFooterLoad();
172
+ await awaitHeaderLoad();
178
173
  const initialTemplateParts = await canvas().$$(
179
174
  '.wp-block-template-part'
180
175
  );
@@ -212,7 +207,7 @@ describe( 'Template Part', () => {
212
207
  } );
213
208
 
214
209
  it( 'Should convert multiple selected blocks to template part', async () => {
215
- await awaitHeaderAndFooterLoad();
210
+ await awaitHeaderLoad();
216
211
  const initialTemplateParts = await canvas().$$(
217
212
  '.wp-block-template-part'
218
213
  );
@@ -260,73 +255,94 @@ describe( 'Template Part', () => {
260
255
  finalTemplateParts.length - initialTemplateParts.length
261
256
  ).toBe( 1 );
262
257
  } );
263
- } );
264
-
265
- describe( 'Template part placeholder', () => {
266
- // Test constants for template part.
267
- const testContent = 'some words...';
268
-
269
- // Selectors
270
- const entitiesSaveSelector =
271
- '.editor-entities-saved-states__save-button';
272
- const savePostSelector = '.editor-post-publish-button__button';
273
- const templatePartSelector = '*[data-type="core/template-part"]';
274
- const activatedTemplatePartSelector = `${ templatePartSelector }.block-editor-block-list__layout`;
275
- const testContentSelector = `//p[contains(., "${ testContent }")]`;
276
- const createNewButtonSelector =
277
- '//button[contains(text(), "New template part")]';
278
- const chooseExistingButtonSelector =
279
- '//button[contains(text(), "Choose existing")]';
280
- const confirmTitleButtonSelector =
281
- '.wp-block-template-part__placeholder-create-new__title-form .components-button.is-primary';
282
-
283
- // Template parts can't be used in posts, so this test needs to be rebuilt for the template editor.
284
- it.skip( 'Should insert new template part on creation', async () => {
285
- await createNewPost();
286
- await disablePrePublishChecks();
287
- // Create new template part.
288
- await insertBlock( 'Template Part' );
289
- await page.waitForXPath( chooseExistingButtonSelector );
290
- const [ createNewButton ] = await page.$x(
291
- createNewButtonSelector
292
- );
293
- await createNewButton.click();
294
- const confirmTitleButton = await page.waitForSelector(
295
- confirmTitleButtonSelector
296
- );
297
- await page.keyboard.press( 'Tab' );
298
- await page.keyboard.press( 'Tab' );
299
- await page.keyboard.type( 'Create New' );
300
- await confirmTitleButton.click();
301
-
302
- const newTemplatePart = await page.waitForSelector(
303
- activatedTemplatePartSelector
304
- );
305
- expect( newTemplatePart ).toBeTruthy();
306
-
307
- // Finish creating template part, insert some text, and save.
308
- await page.click( '.block-editor-button-block-appender' );
309
- await page.click( '.editor-block-list-item-paragraph' );
310
- await page.keyboard.type( testContent );
311
- await page.click( savePostSelector );
312
- await page.click( entitiesSaveSelector );
313
-
314
- await createNewPost();
315
- // Try to insert the template part we created.
316
- await insertBlock( 'Template Part' );
317
- const chooseExistingButton = await page.waitForXPath(
318
- chooseExistingButtonSelector
319
- );
320
- await chooseExistingButton.click();
321
- const preview = await page.waitForSelector(
322
- '[aria-label="Create New"]'
323
- );
324
- await preview.click();
325
- await page.waitForSelector( activatedTemplatePartSelector );
326
- const templatePartContent = await page.waitForXPath(
327
- testContentSelector
328
- );
329
- expect( templatePartContent ).toBeTruthy();
258
+ describe( 'Template part placeholder', () => {
259
+ // Test constants for template part.
260
+ const testContent = 'some words...';
261
+
262
+ // Selectors
263
+ const entitiesSaveSelector =
264
+ '.editor-entities-saved-states__save-button';
265
+ const savePostSelector = '.edit-site-save-button__button';
266
+ const templatePartSelector = '*[data-type="core/template-part"]';
267
+ const activatedTemplatePartSelector = `${ templatePartSelector }.block-editor-block-list__layout`;
268
+ const createNewButtonSelector =
269
+ '//button[contains(text(), "New template part")]';
270
+ const chooseExistingButtonSelector =
271
+ '//button[contains(text(), "Choose existing")]';
272
+ const confirmTitleButtonSelector =
273
+ '.wp-block-template-part__placeholder-create-new__title-form .components-button.is-primary';
274
+
275
+ it( 'Should insert new template part on creation', async () => {
276
+ let siteEditorCanvas = canvas();
277
+ await awaitHeaderLoad();
278
+
279
+ // Create new template part.
280
+ await insertBlock( 'Template Part' );
281
+ await siteEditorCanvas.waitForXPath(
282
+ chooseExistingButtonSelector
283
+ );
284
+ const [ createNewButton ] = await siteEditorCanvas.$x(
285
+ createNewButtonSelector
286
+ );
287
+ await createNewButton.click();
288
+ const confirmTitleButton = await page.waitForSelector(
289
+ confirmTitleButtonSelector
290
+ );
291
+ await page.keyboard.press( 'Tab' );
292
+ await page.keyboard.press( 'Tab' );
293
+ await page.keyboard.type( 'Create New' );
294
+ await confirmTitleButton.click();
295
+
296
+ const newTemplatePart = await siteEditorCanvas.waitForSelector(
297
+ activatedTemplatePartSelector
298
+ );
299
+ expect( newTemplatePart ).toBeTruthy();
300
+
301
+ // Finish creating template part, insert some text, and save.
302
+ await siteEditorCanvas.waitForSelector(
303
+ '.block-editor-button-block-appender'
304
+ );
305
+ await siteEditorCanvas.click(
306
+ '.block-editor-button-block-appender'
307
+ );
308
+ await page.waitForSelector(
309
+ '.editor-block-list-item-paragraph'
310
+ );
311
+ await page.click( '.editor-block-list-item-paragraph' );
312
+ await page.keyboard.type( testContent );
313
+ await page.click( savePostSelector );
314
+ await page.click( entitiesSaveSelector );
315
+
316
+ // Reload the page so as the new template part is available in the existing template parts.
317
+ await siteEditor.visit();
318
+ siteEditorCanvas = canvas();
319
+ await awaitHeaderLoad();
320
+ // Try to insert the template part we created.
321
+ await insertBlock( 'Template Part' );
322
+ const chooseExistingButton = await siteEditorCanvas.waitForXPath(
323
+ chooseExistingButtonSelector
324
+ );
325
+ await chooseExistingButton.click();
326
+ await page.waitForSelector(
327
+ '.wp-block-template-part__selection-preview-container'
328
+ );
329
+ const preview = await page.waitForSelector(
330
+ '.wp-block-template-part__selection-preview-item[aria-label="Create New"]'
331
+ );
332
+ await preview.click();
333
+ // We now have the same template part two times in the page, so check accordingly.
334
+ const paragraphs = await siteEditorCanvas.$$eval(
335
+ '[data-type="core/template-part"] > p:first-child',
336
+ ( options ) =>
337
+ options.map( ( option ) => option.textContent )
338
+ );
339
+ expect( paragraphs ).toHaveLength( 2 );
340
+ expect(
341
+ paragraphs.every(
342
+ ( paragraph ) => paragraph === testContent
343
+ )
344
+ ).toBeTruthy();
345
+ } );
330
346
  } );
331
347
  } );
332
348
  } );
@@ -22,29 +22,31 @@ const {
22
22
  disableWelcomeGuide,
23
23
  } = siteEditor;
24
24
 
25
- const assertSaveButtonIsDisabled = () =>
25
+ const assertSaveButtonIsDisabled = async () =>
26
26
  page.waitForSelector(
27
27
  '.edit-site-save-button__button[aria-disabled="true"]'
28
28
  );
29
29
 
30
- const assertSaveButtonIsEnabled = () =>
30
+ const assertSaveButtonIsEnabled = async () =>
31
31
  page.waitForSelector(
32
32
  '.edit-site-save-button__button[aria-disabled="false"]'
33
33
  );
34
34
 
35
- const waitForNotice = () => page.waitForSelector( '.components-snackbar' );
36
-
37
35
  const clickButtonInNotice = async () => {
38
36
  const selector = '.components-snackbar button';
39
37
  await page.waitForSelector( selector );
40
38
  await page.click( selector );
41
39
  };
42
40
 
43
- const clickUndoInHeaderToolbar = () =>
41
+ const clickUndoInHeaderToolbar = async () =>
44
42
  page.click( '.edit-site-header__toolbar button[aria-label="Undo"]' );
45
43
 
46
- const clickRedoInHeaderToolbar = () =>
47
- page.click( '.edit-site-header__toolbar button[aria-label="Redo"]' );
44
+ const clickRedoInHeaderToolbar = async () => {
45
+ await page.waitForSelector(
46
+ '.edit-site-header__toolbar button[aria-label="Redo"][aria-disabled="false"]'
47
+ );
48
+ return page.click( '.edit-site-header__toolbar button[aria-label="Redo"]' );
49
+ };
48
50
 
49
51
  const undoRevertInHeaderToolbar = async () => {
50
52
  await clickUndoInHeaderToolbar();
@@ -72,7 +74,9 @@ const save = async () => {
72
74
  const revertTemplate = async () => {
73
75
  await page.click( '.edit-site-document-actions__get-info' );
74
76
  await page.click( '.edit-site-template-details__revert-button' );
75
- await waitForNotice();
77
+ await page.waitForXPath(
78
+ '//*[contains(@class, "components-snackbar") and contains(text(), "Template reverted")]'
79
+ );
76
80
  await assertSaveButtonIsEnabled();
77
81
  };
78
82
 
@@ -89,7 +93,7 @@ const assertTemplatesAreDeleted = async () => {
89
93
 
90
94
  describe( 'Template Revert', () => {
91
95
  beforeAll( async () => {
92
- await activateTheme( 'tt1-blocks' );
96
+ await activateTheme( 'emptytheme' );
93
97
  await trashAllPosts( 'wp_template' );
94
98
  await trashAllPosts( 'wp_template_part' );
95
99
  } );
@@ -10,6 +10,7 @@ import {
10
10
  clickBlockToolbarButton,
11
11
  deleteAllWidgets,
12
12
  createURL,
13
+ openTypographyToolsPanelMenu,
13
14
  } from '@wordpress/e2e-test-utils';
14
15
 
15
16
  /**
@@ -18,10 +19,6 @@ import {
18
19
  // eslint-disable-next-line no-restricted-imports
19
20
  import { find, findAll } from 'puppeteer-testing-library';
20
21
 
21
- const twentyTwentyError = `Stylesheet twentytwenty-block-editor-styles-css was not properly added.
22
- For blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).
23
- For themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`;
24
-
25
22
  describe( 'Widgets Customizer', () => {
26
23
  beforeEach( async () => {
27
24
  await deleteAllWidgets();
@@ -162,8 +159,6 @@ describe( 'Widgets Customizer', () => {
162
159
  name: 'My Search',
163
160
  selector: '.widget-content *',
164
161
  } ).toBeFound( findOptions );
165
-
166
- expect( console ).toHaveWarned( twentyTwentyError );
167
162
  } );
168
163
 
169
164
  it( 'should open the inspector panel', async () => {
@@ -194,7 +189,7 @@ describe( 'Widgets Customizer', () => {
194
189
 
195
190
  const backButton = await find( {
196
191
  role: 'button',
197
- name: 'Back',
192
+ name: /Back/,
198
193
  focused: true,
199
194
  } );
200
195
  await expect( backButton ).toHaveFocus();
@@ -249,8 +244,6 @@ describe( 'Widgets Customizer', () => {
249
244
  } ).toBeFound();
250
245
 
251
246
  await expect( inspectorHeading ).not.toBeVisible();
252
-
253
- expect( console ).toHaveWarned( twentyTwentyError );
254
247
  } );
255
248
 
256
249
  it( 'should handle the inserter outer section', async () => {
@@ -348,7 +341,7 @@ describe( 'Widgets Customizer', () => {
348
341
  // Back to the widget areas panel.
349
342
  const backButton = await find( {
350
343
  role: 'button',
351
- name: 'Back',
344
+ name: /Back/,
352
345
  } );
353
346
  await backButton.click();
354
347
 
@@ -358,8 +351,6 @@ describe( 'Widgets Customizer', () => {
358
351
  name: 'Add a block',
359
352
  level: 2,
360
353
  } ).not.toBeFound();
361
-
362
- expect( console ).toHaveWarned( twentyTwentyError );
363
354
  } );
364
355
 
365
356
  it( 'should move focus to the block', async () => {
@@ -386,7 +377,7 @@ describe( 'Widgets Customizer', () => {
386
377
  await page.keyboard.type( 'First Heading' );
387
378
 
388
379
  // Navigate back to the parent panel.
389
- const backButton = await find( { role: 'button', name: 'Back' } );
380
+ const backButton = await find( { role: 'button', name: /Back/ } );
390
381
  await backButton.click();
391
382
 
392
383
  await waitForPreviewIframe();
@@ -455,8 +446,6 @@ describe( 'Widgets Customizer', () => {
455
446
  text: 'First Heading',
456
447
  } );
457
448
  await expect( headingBlock ).toHaveFocus();
458
-
459
- expect( console ).toHaveWarned( twentyTwentyError );
460
449
  } );
461
450
 
462
451
  it( 'should clear block selection', async () => {
@@ -519,8 +508,6 @@ describe( 'Widgets Customizer', () => {
519
508
  role: 'toolbar',
520
509
  name: 'Block tools',
521
510
  } ).not.toBeFound();
522
-
523
- expect( console ).toHaveWarned( twentyTwentyError );
524
511
  } );
525
512
 
526
513
  it( 'should handle legacy widgets', async () => {
@@ -699,8 +686,6 @@ describe( 'Widgets Customizer', () => {
699
686
  selector: '*[aria-live="polite"][aria-relevant="additions text"]',
700
687
  } ).toBeFound();
701
688
  await expect( paragraphBlock ).toBeVisible();
702
-
703
- expect( console ).toHaveWarned( twentyTwentyError );
704
689
  } );
705
690
 
706
691
  it( 'should move (inner) blocks to another sidebar', async () => {
@@ -760,8 +745,6 @@ describe( 'Widgets Customizer', () => {
760
745
  await expect( movedParagraphBlockQuery ).toBeFound();
761
746
  const movedParagraphBlock = await find( movedParagraphBlockQuery );
762
747
  await expect( movedParagraphBlock ).toHaveFocus();
763
-
764
- expect( console ).toHaveWarned( twentyTwentyError );
765
748
  } );
766
749
 
767
750
  it( 'should not render Block Settings sections', async () => {
@@ -831,6 +814,9 @@ describe( 'Widgets Customizer', () => {
831
814
  await showMoreSettingsButton.click();
832
815
 
833
816
  // Change `drop cap` (Any change made in this section is sufficient; not required to be `drop cap`).
817
+ await openTypographyToolsPanelMenu();
818
+ await page.click( 'button[aria-label="Show Drop cap"]' );
819
+
834
820
  const [ dropCapToggle ] = await page.$x(
835
821
  "//label[contains(text(), 'Drop cap')]"
836
822
  );
@@ -851,8 +837,6 @@ describe( 'Widgets Customizer', () => {
851
837
  name: 'Customizing ▸ Widgets ▸ Footer #1 Block Settings',
852
838
  level: 3,
853
839
  } );
854
-
855
- expect( console ).toHaveWarned( twentyTwentyError );
856
840
  } );
857
841
  } );
858
842
 
@@ -16,6 +16,7 @@ import {
16
16
  openGlobalBlockInserter,
17
17
  searchForBlock,
18
18
  closeGlobalBlockInserter,
19
+ setBrowserViewport,
19
20
  } from '@wordpress/e2e-test-utils';
20
21
 
21
22
  /**
@@ -25,10 +26,6 @@ import {
25
26
  import { find, findAll } from 'puppeteer-testing-library';
26
27
  import { groupBy, mapValues } from 'lodash';
27
28
 
28
- const twentyTwentyError = `Stylesheet twentytwenty-block-editor-styles-css was not properly added.
29
- For blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).
30
- For themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`;
31
-
32
29
  describe( 'Widgets screen', () => {
33
30
  beforeEach( async () => {
34
31
  await visitWidgetsScreen();
@@ -232,8 +229,6 @@ describe( 'Widgets screen', () => {
232
229
  </div></div>",
233
230
  }
234
231
  ` );
235
-
236
- expect( console ).toHaveWarned( twentyTwentyError );
237
232
  } );
238
233
 
239
234
  it.skip( 'Should insert content using the inline inserter', async () => {
@@ -601,8 +596,6 @@ describe( 'Widgets screen', () => {
601
596
  initialSerializedWidgetAreas[ 'sidebar-1' ],
602
597
  ].join( '\n' )
603
598
  );
604
-
605
- expect( console ).toHaveWarned( twentyTwentyError );
606
599
  } );
607
600
 
608
601
  it.skip( 'Should display legacy widgets', async () => {
@@ -777,8 +770,6 @@ describe( 'Widgets screen', () => {
777
770
  </div></div>",
778
771
  }
779
772
  ` );
780
-
781
- expect( console ).toHaveWarned( twentyTwentyError );
782
773
  } );
783
774
 
784
775
  it( 'Allows widget deletion to be undone', async () => {
@@ -838,8 +829,6 @@ describe( 'Widgets screen', () => {
838
829
  </div></div>",
839
830
  }
840
831
  ` );
841
-
842
- expect( console ).toHaveWarned( twentyTwentyError );
843
832
  } );
844
833
 
845
834
  it( 'can toggle sidebar list view', async () => {
@@ -854,6 +843,41 @@ describe( 'Widgets screen', () => {
854
843
  expect( listItems.length >= widgetAreas.length ).toEqual( true );
855
844
  await closeListView();
856
845
  } );
846
+
847
+ // Check for regressions of https://github.com/WordPress/gutenberg/issues/38002.
848
+ it( 'allows blocks to be added on mobile viewports', async () => {
849
+ await setBrowserViewport( 'small' );
850
+ const [ firstWidgetArea ] = await findAll( {
851
+ role: 'document',
852
+ name: 'Block: Widget Area',
853
+ } );
854
+
855
+ const addParagraphBlock = await getBlockInGlobalInserter( 'Paragraph' );
856
+ await addParagraphBlock.click();
857
+
858
+ const addedParagraphBlockInFirstWidgetArea = await find(
859
+ {
860
+ name: /^Empty block/,
861
+ selector: '[data-block][data-type="core/paragraph"]',
862
+ },
863
+ {
864
+ root: firstWidgetArea,
865
+ }
866
+ );
867
+ await addedParagraphBlockInFirstWidgetArea.focus();
868
+ await page.keyboard.type( 'First Paragraph' );
869
+ const updatedParagraphBlockInFirstWidgetArea = await find(
870
+ {
871
+ name: 'Paragraph block',
872
+ value: 'First Paragraph',
873
+ },
874
+ {
875
+ root: firstWidgetArea,
876
+ }
877
+ );
878
+
879
+ expect( updatedParagraphBlockInFirstWidgetArea ).toBeTruthy();
880
+ } );
857
881
  } );
858
882
 
859
883
  /**