@wordpress/e2e-tests 4.1.0 → 4.4.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 (39) hide show
  1. package/config/flaky-tests-reporter.js +1 -0
  2. package/config/setup-test-framework.js +3 -0
  3. package/package.json +6 -6
  4. package/specs/editor/blocks/__snapshots__/buttons.test.js.snap +4 -4
  5. package/specs/editor/blocks/__snapshots__/heading.test.js.snap +0 -6
  6. package/specs/editor/blocks/{comments-query.test.js → comments.test.js} +5 -13
  7. package/specs/editor/blocks/heading.test.js +7 -7
  8. package/specs/editor/blocks/navigation.test.js +58 -10
  9. package/specs/editor/blocks/table.test.js +14 -1
  10. package/specs/editor/fixtures/menu-items-response-fixture.json +48 -144
  11. package/specs/editor/plugins/iframed-inline-styles.test.js +1 -0
  12. package/specs/editor/plugins/nonce.test.js +6 -7
  13. package/specs/editor/various/__snapshots__/inserting-blocks.test.js.snap +1 -1
  14. package/specs/editor/various/block-switcher.test.js +3 -0
  15. package/specs/editor/various/datepicker.test.js +19 -7
  16. package/specs/editor/various/inserting-blocks.test.js +1 -1
  17. package/specs/editor/various/keyboard-navigable-blocks.test.js +0 -3
  18. package/specs/editor/various/multi-block-selection.test.js +48 -0
  19. package/specs/editor/various/post-visibility.test.js +1 -1
  20. package/specs/editor/various/scheduling.test.js +2 -2
  21. package/specs/editor/various/switch-to-draft.test.js +1 -1
  22. package/specs/editor/various/writing-flow.test.js +52 -19
  23. package/specs/experiments/blocks/post-comments-form.test.js +46 -0
  24. package/specs/editor/blocks/__snapshots__/code.test.js.snap +0 -14
  25. package/specs/editor/blocks/__snapshots__/html.test.js.snap +0 -8
  26. package/specs/editor/blocks/__snapshots__/image.test.js.snap +0 -25
  27. package/specs/editor/blocks/__snapshots__/preformatted.test.js.snap +0 -24
  28. package/specs/editor/blocks/__snapshots__/separator.test.js.snap +0 -7
  29. package/specs/editor/blocks/code.test.js +0 -48
  30. package/specs/editor/blocks/html.test.js +0 -31
  31. package/specs/editor/blocks/image.test.js +0 -373
  32. package/specs/editor/blocks/paragraph.test.js +0 -26
  33. package/specs/editor/blocks/preformatted.test.js +0 -62
  34. package/specs/editor/blocks/separator.test.js +0 -22
  35. package/specs/editor/plugins/image-size.test.js +0 -71
  36. package/specs/editor/various/block-locking.test.js +0 -120
  37. package/specs/editor/various/popovers.test.js +0 -27
  38. package/specs/site-editor/template-part.test.js +0 -346
  39. package/specs/site-editor/template-revert.test.js +0 -209
@@ -56,6 +56,7 @@ class FlakyTestsReporter {
56
56
  await fs.writeFile(
57
57
  `flaky-tests/${ filenamify( testTitle ) }.json`,
58
58
  JSON.stringify( {
59
+ version: 1,
59
60
  runner: 'jest-circus',
60
61
  title: testTitle,
61
62
  path: testPath,
@@ -13,6 +13,7 @@ import {
13
13
  clearLocalStorage,
14
14
  enablePageDialogAccept,
15
15
  isOfflineMode,
16
+ resetPreferences,
16
17
  setBrowserViewport,
17
18
  trashAllPosts,
18
19
  } from '@wordpress/e2e-test-utils';
@@ -242,6 +243,7 @@ beforeAll( async () => {
242
243
  enablePageDialogAccept();
243
244
  observeConsoleLogging();
244
245
  await simulateAdverseConditions();
246
+ await resetPreferences();
245
247
  await activateTheme( 'twentytwentyone' );
246
248
  await trashAllPosts();
247
249
  await trashAllPosts( 'wp_block' );
@@ -253,6 +255,7 @@ beforeAll( async () => {
253
255
  } );
254
256
 
255
257
  afterEach( async () => {
258
+ await resetPreferences();
256
259
  await setupBrowser();
257
260
  } );
258
261
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "4.1.0",
3
+ "version": "4.4.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.3.0",
27
- "@wordpress/jest-console": "^5.0.2",
26
+ "@wordpress/e2e-test-utils": "^7.6.0",
27
+ "@wordpress/jest-console": "^5.2.0",
28
28
  "@wordpress/jest-puppeteer-axe": "^4.0.2",
29
- "@wordpress/scripts": "^22.5.0",
30
- "@wordpress/url": "^3.8.0",
29
+ "@wordpress/scripts": "^23.2.0",
30
+ "@wordpress/url": "^3.11.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": "1ba52312b56db563df2d8d4fba5b00613fb46d8c"
49
+ "gitHead": "a3e0b62091e8a8bdf5e2518e42d60d7098af48cc"
50
50
  }
@@ -3,7 +3,7 @@
3
3
  exports[`Buttons can jump to the link editor using the keyboard shortcut 1`] = `
4
4
  "<!-- wp:buttons -->
5
5
  <div class=\\"wp-block-buttons\\"><!-- wp:button -->
6
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link\\" href=\\"https://www.wordpress.org/\\">WordPress</a></div>
6
+ <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\" href=\\"https://www.wordpress.org/\\">WordPress</a></div>
7
7
  <!-- /wp:button --></div>
8
8
  <!-- /wp:buttons -->"
9
9
  `;
@@ -11,7 +11,7 @@ exports[`Buttons can jump to the link editor using the keyboard shortcut 1`] = `
11
11
  exports[`Buttons dismisses link editor when escape is pressed 1`] = `
12
12
  "<!-- wp:buttons -->
13
13
  <div class=\\"wp-block-buttons\\"><!-- wp:button -->
14
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link\\">WordPress</a></div>
14
+ <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">WordPress</a></div>
15
15
  <!-- /wp:button --></div>
16
16
  <!-- /wp:buttons -->"
17
17
  `;
@@ -19,7 +19,7 @@ exports[`Buttons dismisses link editor when escape is pressed 1`] = `
19
19
  exports[`Buttons has focus on button content (slash inserter) 1`] = `
20
20
  "<!-- wp:buttons -->
21
21
  <div class=\\"wp-block-buttons\\"><!-- wp:button -->
22
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link\\">Content</a></div>
22
+ <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">Content</a></div>
23
23
  <!-- /wp:button --></div>
24
24
  <!-- /wp:buttons -->"
25
25
  `;
@@ -27,7 +27,7 @@ exports[`Buttons has focus on button content (slash inserter) 1`] = `
27
27
  exports[`Buttons has focus on button content 1`] = `
28
28
  "<!-- wp:buttons -->
29
29
  <div class=\\"wp-block-buttons\\"><!-- wp:button -->
30
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link\\">Content</a></div>
30
+ <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">Content</a></div>
31
31
  <!-- /wp:button --></div>
32
32
  <!-- /wp:buttons -->"
33
33
  `;
@@ -12,12 +12,6 @@ exports[`Heading can be created by prefixing number sign and a space 1`] = `
12
12
  <!-- /wp:heading -->"
13
13
  `;
14
14
 
15
- exports[`Heading should correctly apply custom colors 1`] = `
16
- "<!-- wp:heading {\\"level\\":3,\\"style\\":{\\"color\\":{\\"text\\":\\"#0782f6\\"}}} -->
17
- <h3 class=\\"has-text-color\\" style=\\"color:#0782f6\\">Heading</h3>
18
- <!-- /wp:heading -->"
19
- `;
20
-
21
15
  exports[`Heading should correctly apply named colors 1`] = `
22
16
  "<!-- wp:heading {\\"textColor\\":\\"luminous-vivid-orange\\"} -->
23
17
  <h2 class=\\"has-luminous-vivid-orange-color has-text-color\\">Heading</h2>
@@ -11,7 +11,7 @@ import {
11
11
  trashAllComments,
12
12
  } from '@wordpress/e2e-test-utils';
13
13
 
14
- describe( 'Comment Query Loop', () => {
14
+ describe( 'Comments', () => {
15
15
  let previousPageComments,
16
16
  previousCommentsPerPage,
17
17
  previousDefaultCommentsPage;
@@ -27,19 +27,12 @@ describe( 'Comment Query Loop', () => {
27
27
  it( 'We show no results message if there are no comments', async () => {
28
28
  await trashAllComments();
29
29
  await createNewPost();
30
- await insertBlock( 'Comments Query Loop' );
31
- await page.waitForSelector( '[data-testid="noresults"]' );
32
- expect(
33
- await page.evaluate(
34
- ( el ) => el.innerText,
35
- await page.$( '[data-testid="noresults"]' )
36
- )
37
- ).toEqual( 'No results found.' );
30
+ await insertBlock( 'Comments' );
31
+ await page.waitForXPath( '//p[contains(text(), "No results found.")]' );
38
32
  } );
39
33
  it( 'Pagination links are working as expected', async () => {
40
34
  await createNewPost();
41
- await insertBlock( 'Comments Query Loop' );
42
- await insertBlock( 'Post Comments Form' );
35
+ await insertBlock( 'Comments' );
43
36
  await publishPost();
44
37
  // Visit the post that was just published.
45
38
  await page.click(
@@ -99,8 +92,7 @@ describe( 'Comment Query Loop', () => {
99
92
  it( 'Pagination links are not appearing if break comments is not enabled', async () => {
100
93
  await setOption( 'page_comments', '0' );
101
94
  await createNewPost();
102
- await insertBlock( 'Comments Query Loop' );
103
- await insertBlock( 'Post Comments Form' );
95
+ await insertBlock( 'Comments' );
104
96
  await publishPost();
105
97
  // Visit the post that was just published.
106
98
  await page.click(
@@ -12,8 +12,6 @@ describe( 'Heading', () => {
12
12
  const COLOR_ITEM_SELECTOR =
13
13
  '.block-editor-panel-color-gradient-settings__dropdown';
14
14
  const CUSTOM_COLOR_BUTTON_X_SELECTOR = `.components-color-palette__custom-color`;
15
- const CUSTOM_COLOR_DETAILS_BUTTON_SELECTOR =
16
- '.components-color-picker button[aria-label="Show detailed inputs"]';
17
15
  const COLOR_INPUT_FIELD_SELECTOR =
18
16
  '.components-color-picker .components-input-control__input';
19
17
 
@@ -82,14 +80,16 @@ describe( 'Heading', () => {
82
80
  );
83
81
 
84
82
  await customTextColorButton.click();
85
- await page.click( CUSTOM_COLOR_DETAILS_BUTTON_SELECTOR );
86
83
  await page.waitForSelector( COLOR_INPUT_FIELD_SELECTOR );
87
84
  await page.click( COLOR_INPUT_FIELD_SELECTOR );
88
85
  await pressKeyWithModifier( 'primary', 'A' );
89
- await page.keyboard.type( '0782f6' );
90
- await page.click( 'h3[data-type="core/heading"]' );
91
- await page.waitForXPath( '//button//span[contains(text(), "0782f6")]' );
92
- expect( await getEditedPostContent() ).toMatchSnapshot();
86
+ await page.keyboard.type( '4b7f4d' );
87
+ await page.keyboard.press( 'Enter' );
88
+ expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
89
+ "<!-- wp:heading {\\"level\\":3,\\"style\\":{\\"color\\":{\\"text\\":\\"#4b7f4d\\"}}} -->
90
+ <h3 class=\\"has-text-color\\" style=\\"color:#4b7f4d\\">Heading</h3>
91
+ <!-- /wp:heading -->"
92
+ ` );
93
93
  } );
94
94
 
95
95
  it( 'should correctly apply named colors', async () => {
@@ -807,6 +807,58 @@ describe( 'Navigation', () => {
807
807
  );
808
808
  } );
809
809
 
810
+ it( 'correctly decodes special characters in the created Page title for display', async () => {
811
+ await createNewPost();
812
+ await insertBlock( 'Navigation' );
813
+ const startEmptyButton = await page.waitForXPath( START_EMPTY_XPATH );
814
+ await startEmptyButton.click();
815
+ const appender = await page.waitForSelector(
816
+ '.wp-block-navigation .block-list-appender'
817
+ );
818
+ await appender.click();
819
+
820
+ // Wait for URL input to be focused
821
+ // Insert name for the new page.
822
+ const pageTitle = 'This & That & Some < other > chars';
823
+ const input = await page.waitForSelector(
824
+ 'input.block-editor-url-input__input:focus'
825
+ );
826
+ await input.type( pageTitle );
827
+
828
+ // When creating a page, the URLControl makes a request to the
829
+ // url-details endpoint to fetch information about the page.
830
+ // Because the draft is inaccessible publicly, this request
831
+ // returns a 404 response. Wait for the response and expect
832
+ // the error to have occurred.
833
+ const createPageButton = await page.waitForSelector(
834
+ '.block-editor-link-control__search-create'
835
+ );
836
+ const responsePromise = page.waitForResponse(
837
+ ( response ) =>
838
+ response.url().includes( 'url-details' ) &&
839
+ response.status() === 404
840
+ );
841
+ const createPagePromise = createPageButton.click();
842
+ await Promise.all( [ responsePromise, createPagePromise ] );
843
+
844
+ await waitForBlock( 'Navigation' );
845
+
846
+ const innerLinkBlock = await waitForBlock( 'Custom Link' );
847
+
848
+ const linkText = await innerLinkBlock.$eval(
849
+ '[aria-label="Navigation link text"]',
850
+ ( element ) => {
851
+ return element.innerText;
852
+ }
853
+ );
854
+
855
+ expect( linkText ).toContain( pageTitle );
856
+
857
+ expect( console ).toHaveErroredWith(
858
+ 'Failed to load resource: the server responded with a status of 404 (Not Found)'
859
+ );
860
+ } );
861
+
810
862
  it( 'renders buttons for the submenu opener elements when the block is set to open on click instead of hover', async () => {
811
863
  await createClassicMenu( { name: 'Test Menu 2' }, menuItemsFixture );
812
864
  await createNewPost();
@@ -1294,11 +1346,9 @@ describe( 'Navigation', () => {
1294
1346
  `//*[contains(@class, 'components-snackbar__content')][ text()="You do not have permission to edit this Menu. Any changes made will not be saved." ]`
1295
1347
  );
1296
1348
 
1297
- // Expect a console 403 for request to Navigation Areas for lower permission users.
1298
- // This is because reading requires the `edit_theme_options` capability
1299
- // which the Contributor level user does not have.
1300
- // See: https://github.com/WordPress/gutenberg/blob/4cedaf0c4abb0aeac4bfd4289d63e9889efe9733/lib/class-wp-rest-block-navigation-areas-controller.php#L81-L91.
1301
- // Todo: removed once Nav Areas are removed from the Gutenberg Plugin.
1349
+ // Expect a console 403 for requests to:
1350
+ // * /wp/v2/settings?_locale=user
1351
+ // * /wp/v2/templates?context=edit&post_type=post&per_page=100&_locale=user
1302
1352
  expect( console ).toHaveErrored();
1303
1353
  } );
1304
1354
 
@@ -1317,11 +1367,9 @@ describe( 'Navigation', () => {
1317
1367
  `//*[contains(@class, 'components-snackbar__content')][ text()="${ noticeText }" ]`
1318
1368
  );
1319
1369
 
1320
- // Expect a console 403 for request to Navigation Areas for lower permission users.
1321
- // This is because reading requires the `edit_theme_options` capability
1322
- // which the Contributor level user does not have.
1323
- // See: https://github.com/WordPress/gutenberg/blob/4cedaf0c4abb0aeac4bfd4289d63e9889efe9733/lib/class-wp-rest-block-navigation-areas-controller.php#L81-L91.
1324
- // Todo: removed once Nav Areas are removed from the Gutenberg Plugin.
1370
+ // Expect a console 403 for requests to:
1371
+ // * /wp/v2/settings?_locale=user
1372
+ // * /wp/v2/templates?context=edit&post_type=post&per_page=100&_locale=user
1325
1373
  expect( console ).toHaveErrored();
1326
1374
  } );
1327
1375
  } );
@@ -269,7 +269,6 @@ describe( 'Table', () => {
269
269
  // Create the table.
270
270
  await clickButton( createButtonLabel );
271
271
 
272
- await page.keyboard.press( 'Tab' );
273
272
  await page.keyboard.type( '1' );
274
273
  await page.keyboard.press( 'ArrowDown' );
275
274
  await page.keyboard.type( '2' );
@@ -280,4 +279,18 @@ describe( 'Table', () => {
280
279
 
281
280
  expect( await getEditedPostContent() ).toMatchSnapshot();
282
281
  } );
282
+
283
+ it( 'should not have focus loss after creation', async () => {
284
+ // Insert table block.
285
+ await insertBlock( 'Table' );
286
+
287
+ // Create the table.
288
+ await clickButton( createButtonLabel );
289
+
290
+ // Focus should be in first td.
291
+ const isInTd = await page.waitForSelector(
292
+ 'td[contentEditable="true"]'
293
+ );
294
+ await expect( isInTd ).toHaveFocus();
295
+ } );
283
296
  } );
@@ -16,16 +16,10 @@
16
16
  "parent": 0,
17
17
  "menu_order": 1,
18
18
  "target": "",
19
- "classes": [
20
- ""
21
- ],
22
- "xfn": [
23
- ""
24
- ],
19
+ "classes": [ "" ],
20
+ "xfn": [ "" ],
25
21
  "meta": [],
26
- "menus": [
27
- 23
28
- ],
22
+ "menus": [ 23 ],
29
23
  "_links": {
30
24
  "self": [
31
25
  {
@@ -95,16 +89,10 @@
95
89
  "parent": 0,
96
90
  "menu_order": 2,
97
91
  "target": "",
98
- "classes": [
99
- ""
100
- ],
101
- "xfn": [
102
- ""
103
- ],
92
+ "classes": [ "" ],
93
+ "xfn": [ "" ],
104
94
  "meta": [],
105
- "menus": [
106
- 23
107
- ],
95
+ "menus": [ 23 ],
108
96
  "_links": {
109
97
  "self": [
110
98
  {
@@ -181,16 +169,10 @@
181
169
  "parent": 95,
182
170
  "menu_order": 3,
183
171
  "target": "",
184
- "classes": [
185
- ""
186
- ],
187
- "xfn": [
188
- ""
189
- ],
172
+ "classes": [ "" ],
173
+ "xfn": [ "" ],
190
174
  "meta": [],
191
- "menus": [
192
- 23
193
- ],
175
+ "menus": [ 23 ],
194
176
  "_links": {
195
177
  "self": [
196
178
  {
@@ -267,16 +249,10 @@
267
249
  "parent": 0,
268
250
  "menu_order": 4,
269
251
  "target": "",
270
- "classes": [
271
- ""
272
- ],
273
- "xfn": [
274
- ""
275
- ],
252
+ "classes": [ "" ],
253
+ "xfn": [ "" ],
276
254
  "meta": [],
277
- "menus": [
278
- 23
279
- ],
255
+ "menus": [ 23 ],
280
256
  "_links": {
281
257
  "self": [
282
258
  {
@@ -353,16 +329,10 @@
353
329
  "parent": 97,
354
330
  "menu_order": 5,
355
331
  "target": "",
356
- "classes": [
357
- ""
358
- ],
359
- "xfn": [
360
- ""
361
- ],
332
+ "classes": [ "" ],
333
+ "xfn": [ "" ],
362
334
  "meta": [],
363
- "menus": [
364
- 23
365
- ],
335
+ "menus": [ 23 ],
366
336
  "_links": {
367
337
  "self": [
368
338
  {
@@ -439,16 +409,10 @@
439
409
  "parent": 98,
440
410
  "menu_order": 6,
441
411
  "target": "",
442
- "classes": [
443
- ""
444
- ],
445
- "xfn": [
446
- ""
447
- ],
412
+ "classes": [ "" ],
413
+ "xfn": [ "" ],
448
414
  "meta": [],
449
- "menus": [
450
- 23
451
- ],
415
+ "menus": [ 23 ],
452
416
  "_links": {
453
417
  "self": [
454
418
  {
@@ -525,16 +489,10 @@
525
489
  "parent": 99,
526
490
  "menu_order": 7,
527
491
  "target": "",
528
- "classes": [
529
- ""
530
- ],
531
- "xfn": [
532
- ""
533
- ],
492
+ "classes": [ "" ],
493
+ "xfn": [ "" ],
534
494
  "meta": [],
535
- "menus": [
536
- 23
537
- ],
495
+ "menus": [ 23 ],
538
496
  "_links": {
539
497
  "self": [
540
498
  {
@@ -611,16 +569,10 @@
611
569
  "parent": 100,
612
570
  "menu_order": 8,
613
571
  "target": "",
614
- "classes": [
615
- ""
616
- ],
617
- "xfn": [
618
- ""
619
- ],
572
+ "classes": [ "" ],
573
+ "xfn": [ "" ],
620
574
  "meta": [],
621
- "menus": [
622
- 23
623
- ],
575
+ "menus": [ 23 ],
624
576
  "_links": {
625
577
  "self": [
626
578
  {
@@ -697,16 +649,10 @@
697
649
  "parent": 0,
698
650
  "menu_order": 9,
699
651
  "target": "",
700
- "classes": [
701
- ""
702
- ],
703
- "xfn": [
704
- ""
705
- ],
652
+ "classes": [ "" ],
653
+ "xfn": [ "" ],
706
654
  "meta": [],
707
- "menus": [
708
- 23
709
- ],
655
+ "menus": [ 23 ],
710
656
  "_links": {
711
657
  "self": [
712
658
  {
@@ -783,16 +729,10 @@
783
729
  "parent": 0,
784
730
  "menu_order": 10,
785
731
  "target": "",
786
- "classes": [
787
- ""
788
- ],
789
- "xfn": [
790
- ""
791
- ],
732
+ "classes": [ "" ],
733
+ "xfn": [ "" ],
792
734
  "meta": [],
793
- "menus": [
794
- 23
795
- ],
735
+ "menus": [ 23 ],
796
736
  "_links": {
797
737
  "self": [
798
738
  {
@@ -869,16 +809,10 @@
869
809
  "parent": 0,
870
810
  "menu_order": 11,
871
811
  "target": "",
872
- "classes": [
873
- ""
874
- ],
875
- "xfn": [
876
- ""
877
- ],
812
+ "classes": [ "" ],
813
+ "xfn": [ "" ],
878
814
  "meta": [],
879
- "menus": [
880
- 23
881
- ],
815
+ "menus": [ 23 ],
882
816
  "_links": {
883
817
  "self": [
884
818
  {
@@ -955,16 +889,10 @@
955
889
  "parent": 104,
956
890
  "menu_order": 12,
957
891
  "target": "",
958
- "classes": [
959
- ""
960
- ],
961
- "xfn": [
962
- ""
963
- ],
892
+ "classes": [ "" ],
893
+ "xfn": [ "" ],
964
894
  "meta": [],
965
- "menus": [
966
- 23
967
- ],
895
+ "menus": [ 23 ],
968
896
  "_links": {
969
897
  "self": [
970
898
  {
@@ -1041,16 +969,10 @@
1041
969
  "parent": 105,
1042
970
  "menu_order": 13,
1043
971
  "target": "",
1044
- "classes": [
1045
- ""
1046
- ],
1047
- "xfn": [
1048
- ""
1049
- ],
972
+ "classes": [ "" ],
973
+ "xfn": [ "" ],
1050
974
  "meta": [],
1051
- "menus": [
1052
- 23
1053
- ],
975
+ "menus": [ 23 ],
1054
976
  "_links": {
1055
977
  "self": [
1056
978
  {
@@ -1127,16 +1049,10 @@
1127
1049
  "parent": 106,
1128
1050
  "menu_order": 14,
1129
1051
  "target": "",
1130
- "classes": [
1131
- ""
1132
- ],
1133
- "xfn": [
1134
- ""
1135
- ],
1052
+ "classes": [ "" ],
1053
+ "xfn": [ "" ],
1136
1054
  "meta": [],
1137
- "menus": [
1138
- 23
1139
- ],
1055
+ "menus": [ 23 ],
1140
1056
  "_links": {
1141
1057
  "self": [
1142
1058
  {
@@ -1213,16 +1129,10 @@
1213
1129
  "parent": 0,
1214
1130
  "menu_order": 15,
1215
1131
  "target": "",
1216
- "classes": [
1217
- ""
1218
- ],
1219
- "xfn": [
1220
- ""
1221
- ],
1132
+ "classes": [ "" ],
1133
+ "xfn": [ "" ],
1222
1134
  "meta": [],
1223
- "menus": [
1224
- 23
1225
- ],
1135
+ "menus": [ 23 ],
1226
1136
  "_links": {
1227
1137
  "self": [
1228
1138
  {
@@ -1292,16 +1202,10 @@
1292
1202
  "parent": 108,
1293
1203
  "menu_order": 16,
1294
1204
  "target": "",
1295
- "classes": [
1296
- ""
1297
- ],
1298
- "xfn": [
1299
- ""
1300
- ],
1205
+ "classes": [ "" ],
1206
+ "xfn": [ "" ],
1301
1207
  "meta": [],
1302
- "menus": [
1303
- 23
1304
- ],
1208
+ "menus": [ 23 ],
1305
1209
  "_links": {
1306
1210
  "self": [
1307
1211
  {
@@ -32,6 +32,7 @@ describe( 'iframed inline styles', () => {
32
32
  await deactivatePlugin( 'gutenberg-test-iframed-inline-styles' );
33
33
  } );
34
34
 
35
+ // Skip flaky test. See https://github.com/WordPress/gutenberg/issues/35172
35
36
  it.skip( 'should load inline styles in iframe', async () => {
36
37
  await insertBlock( 'Iframed Inline Styles' );
37
38
 
@@ -9,19 +9,18 @@ import {
9
9
  } from '@wordpress/e2e-test-utils';
10
10
 
11
11
  describe( 'Nonce', () => {
12
- beforeAll( async () => {
12
+ // While using beforeEach/afterEach is suboptimal for multiple tests, they
13
+ // are used here to ensure that the nonce plugin doesn't interfere with API
14
+ // calls made in global before/after calls, which may perform API requests.
15
+ beforeEach( async () => {
13
16
  await activatePlugin( 'gutenberg-test-plugin-nonce' );
14
17
  } );
15
-
16
- afterAll( async () => {
18
+ afterEach( async () => {
17
19
  await deactivatePlugin( 'gutenberg-test-plugin-nonce' );
18
20
  } );
19
21
 
20
- beforeEach( async () => {
21
- await createNewPost();
22
- } );
23
-
24
22
  it( 'should refresh when expired', async () => {
23
+ await createNewPost();
25
24
  await page.keyboard.press( 'Enter' );
26
25
  // eslint-disable-next-line no-restricted-syntax
27
26
  await page.waitForTimeout( 5000 );
@@ -108,7 +108,7 @@ exports[`Inserting blocks inserts a block in proper place after having clicked \
108
108
  exports[`Inserting blocks inserts blocks at root level when using the root appender while selection is in an inner block 1`] = `
109
109
  "<!-- wp:buttons -->
110
110
  <div class=\\"wp-block-buttons\\"><!-- wp:button -->
111
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link\\">1.1</a></div>
111
+ <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">1.1</a></div>
112
112
  <!-- /wp:button --></div>
113
113
  <!-- /wp:buttons -->
114
114