@wordpress/e2e-tests 6.4.0 → 6.5.1

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/CHANGELOG.md +2 -0
  2. package/jest.config.js +4 -0
  3. package/package.json +7 -7
  4. package/specs/editor/blocks/pullquote.test.js +3 -3
  5. package/specs/editor/plugins/__snapshots__/align-hook.test.js.snap +11 -11
  6. package/specs/editor/plugins/__snapshots__/container-blocks.test.js.snap +14 -14
  7. package/specs/editor/plugins/__snapshots__/cpt-locking.test.js.snap +29 -29
  8. package/specs/editor/plugins/__snapshots__/iframed-inline-styles.test.js.snap +1 -1
  9. package/specs/editor/plugins/__snapshots__/iframed-masonry-block.test.js.snap +1 -1
  10. package/specs/editor/plugins/__snapshots__/inner-blocks-render-appender.test.js.snap +5 -5
  11. package/specs/editor/plugins/__snapshots__/plugins-api.test.js.snap +2 -2
  12. package/specs/editor/various/__snapshots__/adding-patterns.test.js.snap +4 -4
  13. package/specs/editor/various/__snapshots__/block-grouping.test.js.snap +21 -21
  14. package/specs/editor/various/__snapshots__/block-hierarchy-navigation.test.js.snap +12 -12
  15. package/specs/editor/various/__snapshots__/embedding.test.js.snap +19 -19
  16. package/specs/editor/various/__snapshots__/inserting-blocks.test.js.snap +8 -8
  17. package/specs/editor/various/__snapshots__/keep-styles-on-block-transforms.test.js.snap +11 -11
  18. package/specs/editor/various/__snapshots__/links.test.js.snap +9 -9
  19. package/specs/editor/various/__snapshots__/multi-block-selection.test.js.snap +17 -17
  20. package/specs/editor/various/__snapshots__/rich-text.test.js.snap +5 -5
  21. package/specs/editor/various/block-grouping.test.js +3 -3
  22. package/specs/editor/various/format-library/__snapshots__/text-color.test.js.snap +1 -1
  23. package/specs/editor/various/links.test.js +7 -7
  24. package/specs/editor/various/multi-block-selection.test.js +2 -2
  25. package/specs/performance/front-end-block-theme.test.js +13 -24
  26. package/specs/performance/front-end-classic-theme.test.js +13 -24
  27. package/specs/performance/post-editor.test.js +14 -12
  28. package/specs/performance/site-editor.test.js +1 -2
  29. package/specs/performance/utils.js +12 -1
  30. package/specs/site-editor/multi-entity-saving.test.js +0 -2
  31. package/specs/site-editor/settings-sidebar.test.js +0 -1
  32. package/specs/widgets/editing-widgets.test.js +20 -15
  33. package/specs/editor/blocks/__snapshots__/navigation.test.js.snap +0 -47
  34. package/specs/editor/blocks/navigation.test.js +0 -1723
  35. package/specs/editor/various/__snapshots__/block-deletion.test.js.snap +0 -111
  36. package/specs/editor/various/__snapshots__/list-view.test.js.snap +0 -15
  37. package/specs/editor/various/block-deletion.test.js +0 -209
  38. package/specs/editor/various/list-view.test.js +0 -414
  39. package/specs/editor/various/switch-to-draft.test.js +0 -254
@@ -6,24 +6,24 @@ exports[`Navigating the block hierarchy should appear and function even without
6
6
  <!-- /wp:paragraph -->
7
7
 
8
8
  <!-- wp:image -->
9
- <figure class=\\"wp-block-image\\"><img alt=\\"\\"/></figure>
9
+ <figure class="wp-block-image"><img alt=""/></figure>
10
10
  <!-- /wp:image -->"
11
11
  `;
12
12
 
13
13
  exports[`Navigating the block hierarchy should navigate block hierarchy using only the keyboard 1`] = `
14
14
  "<!-- wp:columns -->
15
- <div class=\\"wp-block-columns\\"><!-- wp:column -->
16
- <div class=\\"wp-block-column\\"><!-- wp:paragraph -->
15
+ <div class="wp-block-columns"><!-- wp:column -->
16
+ <div class="wp-block-column"><!-- wp:paragraph -->
17
17
  <p>First column</p>
18
18
  <!-- /wp:paragraph --></div>
19
19
  <!-- /wp:column -->
20
20
 
21
21
  <!-- wp:column -->
22
- <div class=\\"wp-block-column\\"></div>
22
+ <div class="wp-block-column"></div>
23
23
  <!-- /wp:column -->
24
24
 
25
25
  <!-- wp:column -->
26
- <div class=\\"wp-block-column\\"><!-- wp:paragraph -->
26
+ <div class="wp-block-column"><!-- wp:paragraph -->
27
27
  <p>Third column</p>
28
28
  <!-- /wp:paragraph --></div>
29
29
  <!-- /wp:column --></div>
@@ -32,18 +32,18 @@ exports[`Navigating the block hierarchy should navigate block hierarchy using on
32
32
 
33
33
  exports[`Navigating the block hierarchy should navigate using the list view sidebar 1`] = `
34
34
  "<!-- wp:columns -->
35
- <div class=\\"wp-block-columns\\"><!-- wp:column -->
36
- <div class=\\"wp-block-column\\"><!-- wp:paragraph -->
35
+ <div class="wp-block-columns"><!-- wp:column -->
36
+ <div class="wp-block-column"><!-- wp:paragraph -->
37
37
  <p>First column</p>
38
38
  <!-- /wp:paragraph --></div>
39
39
  <!-- /wp:column -->
40
40
 
41
41
  <!-- wp:column -->
42
- <div class=\\"wp-block-column\\"></div>
42
+ <div class="wp-block-column"></div>
43
43
  <!-- /wp:column -->
44
44
 
45
45
  <!-- wp:column -->
46
- <div class=\\"wp-block-column\\"><!-- wp:paragraph -->
46
+ <div class="wp-block-column"><!-- wp:paragraph -->
47
47
  <p>Third column</p>
48
48
  <!-- /wp:paragraph --></div>
49
49
  <!-- /wp:column --></div>
@@ -51,13 +51,13 @@ exports[`Navigating the block hierarchy should navigate using the list view side
51
51
  `;
52
52
 
53
53
  exports[`Navigating the block hierarchy should select the wrapper div for a group 1`] = `
54
- "<!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
55
- <div class=\\"wp-block-group\\"><!-- wp:paragraph -->
54
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
55
+ <div class="wp-block-group"><!-- wp:paragraph -->
56
56
  <p>just a paragraph</p>
57
57
  <!-- /wp:paragraph -->
58
58
 
59
59
  <!-- wp:separator -->
60
- <hr class=\\"wp-block-separator has-alpha-channel-opacity\\"/>
60
+ <hr class="wp-block-separator has-alpha-channel-opacity"/>
61
61
  <!-- /wp:separator --></div>
62
62
  <!-- /wp:group -->"
63
63
  `;
@@ -2,65 +2,65 @@
2
2
 
3
3
  exports[`Embedding content should allow the user to convert unembeddable URLs to a paragraph with a link in it 1`] = `
4
4
  "<!-- wp:paragraph -->
5
- <p><a href=\\"https://twitter.com/wooyaygutenberg123454312\\">https://twitter.com/wooyaygutenberg123454312</a></p>
5
+ <p><a href="https://twitter.com/wooyaygutenberg123454312">https://twitter.com/wooyaygutenberg123454312</a></p>
6
6
  <!-- /wp:paragraph -->"
7
7
  `;
8
8
 
9
9
  exports[`Embedding content should allow the user to try embedding a failed URL again 1`] = `
10
- "<!-- wp:embed {\\"url\\":\\"https://twitter.com/wooyaygutenberg123454312\\",\\"type\\":\\"rich\\",\\"providerNameSlug\\":\\"twitter\\",\\"responsive\\":true} -->
11
- <figure class=\\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\\"><div class=\\"wp-block-embed__wrapper\\">
10
+ "<!-- wp:embed {"url":"https://twitter.com/wooyaygutenberg123454312","type":"rich","providerNameSlug":"twitter","responsive":true} -->
11
+ <figure class="wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter"><div class="wp-block-embed__wrapper">
12
12
  https://twitter.com/wooyaygutenberg123454312
13
13
  </div></figure>
14
14
  <!-- /wp:embed -->"
15
15
  `;
16
16
 
17
17
  exports[`Embedding content should render embeds in the correct state 1`] = `
18
- "<!-- wp:embed {\\"url\\":\\"https://twitter.com/notnownikki\\",\\"type\\":\\"rich\\",\\"providerNameSlug\\":\\"twitter\\",\\"responsive\\":true} -->
19
- <figure class=\\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\\"><div class=\\"wp-block-embed__wrapper\\">
18
+ "<!-- wp:embed {"url":"https://twitter.com/notnownikki","type":"rich","providerNameSlug":"twitter","responsive":true} -->
19
+ <figure class="wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter"><div class="wp-block-embed__wrapper">
20
20
  https://twitter.com/notnownikki
21
21
  </div></figure>
22
22
  <!-- /wp:embed -->
23
23
 
24
- <!-- wp:embed {\\"url\\":\\"https://twitter.com/wooyaygutenberg123454312\\",\\"type\\":\\"rich\\",\\"providerNameSlug\\":\\"embed-handler\\",\\"responsive\\":true} -->
25
- <figure class=\\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\\"><div class=\\"wp-block-embed__wrapper\\">
24
+ <!-- wp:embed {"url":"https://twitter.com/wooyaygutenberg123454312","type":"rich","providerNameSlug":"embed-handler","responsive":true} -->
25
+ <figure class="wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler"><div class="wp-block-embed__wrapper">
26
26
  https://twitter.com/wooyaygutenberg123454312
27
27
  </div></figure>
28
28
  <!-- /wp:embed -->
29
29
 
30
- <!-- wp:embed {\\"url\\":\\"https://wordpress.org/gutenberg/handbook/\\"} -->
31
- <figure class=\\"wp-block-embed\\"><div class=\\"wp-block-embed__wrapper\\">
30
+ <!-- wp:embed {"url":"https://wordpress.org/gutenberg/handbook/"} -->
31
+ <figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
32
32
  https://wordpress.org/gutenberg/handbook/
33
33
  </div></figure>
34
34
  <!-- /wp:embed -->
35
35
 
36
- <!-- wp:embed {\\"url\\":\\"https://twitter.com/thatbunty\\"} -->
37
- <figure class=\\"wp-block-embed\\"><div class=\\"wp-block-embed__wrapper\\">
36
+ <!-- wp:embed {"url":"https://twitter.com/thatbunty"} -->
37
+ <figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
38
38
  https://twitter.com/thatbunty
39
39
  </div></figure>
40
40
  <!-- /wp:embed -->
41
41
 
42
- <!-- wp:embed {\\"url\\":\\"https://wordpress.org/gutenberg/handbook/block-api/attributes/\\",\\"type\\":\\"wp-embed\\",\\"providerNameSlug\\":\\"wordpress\\"} -->
43
- <figure class=\\"wp-block-embed is-type-wp-embed is-provider-wordpress wp-block-embed-wordpress\\"><div class=\\"wp-block-embed__wrapper\\">
42
+ <!-- wp:embed {"url":"https://wordpress.org/gutenberg/handbook/block-api/attributes/","type":"wp-embed","providerNameSlug":"wordpress"} -->
43
+ <figure class="wp-block-embed is-type-wp-embed is-provider-wordpress wp-block-embed-wordpress"><div class="wp-block-embed__wrapper">
44
44
  https://wordpress.org/gutenberg/handbook/block-api/attributes/
45
45
  </div></figure>
46
46
  <!-- /wp:embed -->
47
47
 
48
- <!-- wp:embed {\\"url\\":\\"https://www.youtube.com/watch?v=lXMskKTw3Bc\\",\\"type\\":\\"video\\",\\"providerNameSlug\\":\\"youtube\\",\\"responsive\\":true,\\"className\\":\\"wp-embed-aspect-16-9 wp-has-aspect-ratio\\"} -->
49
- <figure class=\\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\\"><div class=\\"wp-block-embed__wrapper\\">
48
+ <!-- wp:embed {"url":"https://www.youtube.com/watch?v=lXMskKTw3Bc","type":"video","providerNameSlug":"youtube","responsive":true,"className":"wp-embed-aspect-16-9 wp-has-aspect-ratio"} -->
49
+ <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
50
50
  https://www.youtube.com/watch?v=lXMskKTw3Bc
51
51
  </div></figure>
52
52
  <!-- /wp:embed -->
53
53
 
54
- <!-- wp:embed {\\"url\\":\\"https://cloudup.com/cQFlxqtY4ob\\",\\"type\\":\\"photo\\",\\"providerNameSlug\\":\\"cloudup\\",\\"responsive\\":true} -->
55
- <figure class=\\"wp-block-embed is-type-photo is-provider-cloudup wp-block-embed-cloudup\\"><div class=\\"wp-block-embed__wrapper\\">
54
+ <!-- wp:embed {"url":"https://cloudup.com/cQFlxqtY4ob","type":"photo","providerNameSlug":"cloudup","responsive":true} -->
55
+ <figure class="wp-block-embed is-type-photo is-provider-cloudup wp-block-embed-cloudup"><div class="wp-block-embed__wrapper">
56
56
  https://cloudup.com/cQFlxqtY4ob
57
57
  </div></figure>
58
58
  <!-- /wp:embed -->"
59
59
  `;
60
60
 
61
61
  exports[`Embedding content should retry embeds that could not be embedded with trailing slashes, without the trailing slashes 1`] = `
62
- "<!-- wp:embed {\\"url\\":\\"https://twitter.com/notnownikki/\\",\\"type\\":\\"rich\\",\\"providerNameSlug\\":\\"embed-handler\\",\\"responsive\\":true} -->
63
- <figure class=\\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\\"><div class=\\"wp-block-embed__wrapper\\">
62
+ "<!-- wp:embed {"url":"https://twitter.com/notnownikki/","type":"rich","providerNameSlug":"embed-handler","responsive":true} -->
63
+ <figure class="wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler"><div class="wp-block-embed__wrapper">
64
64
  https://twitter.com/notnownikki/
65
65
  </div></figure>
66
66
  <!-- /wp:embed -->"
@@ -54,8 +54,8 @@ lines preserved[/myshortcode]
54
54
  `;
55
55
 
56
56
  exports[`Inserting blocks inserts a block in proper place after having clicked \`Browse All\` from block appender 1`] = `
57
- "<!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
58
- <div class=\\"wp-block-group\\"><!-- wp:paragraph -->
57
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
58
+ <div class="wp-block-group"><!-- wp:paragraph -->
59
59
  <p>Paragraph inside group</p>
60
60
  <!-- /wp:paragraph --></div>
61
61
  <!-- /wp:group -->
@@ -71,7 +71,7 @@ exports[`Inserting blocks inserts a block in proper place after having clicked \
71
71
  <!-- /wp:paragraph -->
72
72
 
73
73
  <!-- wp:heading -->
74
- <h2 class=\\"wp-block-heading\\">Heading</h2>
74
+ <h2 class="wp-block-heading">Heading</h2>
75
75
  <!-- /wp:heading -->
76
76
 
77
77
  <!-- wp:paragraph -->
@@ -88,12 +88,12 @@ exports[`Inserting blocks inserts a block in proper place after having clicked \
88
88
  <p>First paragraph</p>
89
89
  <!-- /wp:paragraph -->
90
90
 
91
- <!-- wp:cover {\\"isDark\\":false} -->
92
- <div class=\\"wp-block-cover is-light\\"><span aria-hidden=\\"true\\" class=\\"wp-block-cover__background has-background-dim-100 has-background-dim\\"></span><div class=\\"wp-block-cover__inner-container\\"></div></div>
91
+ <!-- wp:cover {"isDark":false} -->
92
+ <div class="wp-block-cover is-light"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container"></div></div>
93
93
  <!-- /wp:cover -->
94
94
 
95
95
  <!-- wp:heading -->
96
- <h2 class=\\"wp-block-heading\\">Heading</h2>
96
+ <h2 class="wp-block-heading">Heading</h2>
97
97
  <!-- /wp:heading -->
98
98
 
99
99
  <!-- wp:paragraph -->
@@ -107,8 +107,8 @@ exports[`Inserting blocks inserts a block in proper place after having clicked \
107
107
 
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
- <div class=\\"wp-block-buttons\\"><!-- wp:button -->
111
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\">1.1</a></div>
110
+ <div class="wp-block-buttons"><!-- wp:button -->
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
 
@@ -1,29 +1,29 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Keep styles on block transforms Should keep colors during a transform 1`] = `
4
- "<!-- wp:paragraph {\\"textColor\\":\\"luminous-vivid-orange\\"} -->
5
- <p class=\\"has-luminous-vivid-orange-color has-text-color\\">Heading</p>
4
+ "<!-- wp:paragraph {"textColor":"luminous-vivid-orange"} -->
5
+ <p class="has-luminous-vivid-orange-color has-text-color">Heading</p>
6
6
  <!-- /wp:paragraph -->"
7
7
  `;
8
8
 
9
9
  exports[`Keep styles on block transforms Should keep the font size during a transform from multiple blocks into multiple blocks 1`] = `
10
- "<!-- wp:heading {\\"fontSize\\":\\"large\\"} -->
11
- <h2 class=\\"wp-block-heading has-large-font-size\\">Line 1 to be made large</h2>
10
+ "<!-- wp:heading {"fontSize":"large"} -->
11
+ <h2 class="wp-block-heading has-large-font-size">Line 1 to be made large</h2>
12
12
  <!-- /wp:heading -->
13
13
 
14
- <!-- wp:heading {\\"fontSize\\":\\"large\\"} -->
15
- <h2 class=\\"wp-block-heading has-large-font-size\\">Line 2 to be made large</h2>
14
+ <!-- wp:heading {"fontSize":"large"} -->
15
+ <h2 class="wp-block-heading has-large-font-size">Line 2 to be made large</h2>
16
16
  <!-- /wp:heading -->
17
17
 
18
- <!-- wp:heading {\\"fontSize\\":\\"large\\"} -->
19
- <h2 class=\\"wp-block-heading has-large-font-size\\">Line 3 to be made large</h2>
18
+ <!-- wp:heading {"fontSize":"large"} -->
19
+ <h2 class="wp-block-heading has-large-font-size">Line 3 to be made large</h2>
20
20
  <!-- /wp:heading -->"
21
21
  `;
22
22
 
23
23
  exports[`Keep styles on block transforms Should not include styles in the group block when grouping a block 1`] = `
24
- "<!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
25
- <div class=\\"wp-block-group\\"><!-- wp:paragraph {\\"fontSize\\":\\"large\\"} -->
26
- <p class=\\"has-large-font-size\\">Line 1 to be made large</p>
24
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
25
+ <div class="wp-block-group"><!-- wp:paragraph {"fontSize":"large"} -->
26
+ <p class="has-large-font-size">Line 1 to be made large</p>
27
27
  <!-- /wp:paragraph --></div>
28
28
  <!-- /wp:group -->"
29
29
  `;
@@ -8,7 +8,7 @@ exports[`Links allows use of escape key to dismiss the url popover 1`] = `
8
8
 
9
9
  exports[`Links can be created by selecting text and clicking Link 1`] = `
10
10
  "<!-- wp:paragraph -->
11
- <p>This is <a href=\\"https://wordpress.org/gutenberg\\">Gutenberg</a></p>
11
+ <p>This is <a href="https://wordpress.org/gutenberg">Gutenberg</a></p>
12
12
  <!-- /wp:paragraph -->"
13
13
  `;
14
14
 
@@ -20,37 +20,37 @@ exports[`Links can be created by selecting text and using keyboard shortcuts 1`]
20
20
 
21
21
  exports[`Links can be created by selecting text and using keyboard shortcuts 2`] = `
22
22
  "<!-- wp:paragraph -->
23
- <p>This is <a href=\\"https://wordpress.org/gutenberg\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\">Gutenberg</a></p>
23
+ <p>This is <a href="https://wordpress.org/gutenberg" target="_blank" rel="noreferrer noopener">Gutenberg</a></p>
24
24
  <!-- /wp:paragraph -->"
25
25
  `;
26
26
 
27
27
  exports[`Links can be created instantly when a URL is selected 1`] = `
28
28
  "<!-- wp:paragraph -->
29
- <p>This is Gutenberg: <a href=\\"https://wordpress.org/gutenberg\\">https://wordpress.org/gutenberg</a></p>
29
+ <p>This is Gutenberg: <a href="https://wordpress.org/gutenberg">https://wordpress.org/gutenberg</a></p>
30
30
  <!-- /wp:paragraph -->"
31
31
  `;
32
32
 
33
33
  exports[`Links can be created without any text selected 1`] = `
34
34
  "<!-- wp:paragraph -->
35
- <p>This is Gutenberg: <a href=\\"https://wordpress.org/gutenberg\\">https://wordpress.org/gutenberg</a></p>
35
+ <p>This is Gutenberg: <a href="https://wordpress.org/gutenberg">https://wordpress.org/gutenberg</a></p>
36
36
  <!-- /wp:paragraph -->"
37
37
  `;
38
38
 
39
39
  exports[`Links can be edited 1`] = `
40
40
  "<!-- wp:paragraph -->
41
- <p>This is <a href=\\"https://wordpress.org/gutenberg/handbook\\">Gutenberg</a></p>
41
+ <p>This is <a href="https://wordpress.org/gutenberg/handbook">Gutenberg</a></p>
42
42
  <!-- /wp:paragraph -->"
43
43
  `;
44
44
 
45
45
  exports[`Links can be edited with collapsed selection 1`] = `
46
46
  "<!-- wp:paragraph -->
47
- <p>This is <a href=\\"https://wordpress.org/gutenberg/handbook\\">Gutenberg</a></p>
47
+ <p>This is <a href="https://wordpress.org/gutenberg/handbook">Gutenberg</a></p>
48
48
  <!-- /wp:paragraph -->"
49
49
  `;
50
50
 
51
51
  exports[`Links can be modified using the keyboard once a link has been set 1`] = `
52
52
  "<!-- wp:paragraph -->
53
- <p>This is <a href=\\"https://wordpress.org/gutenberg\\">Gutenberg</a>.</p>
53
+ <p>This is <a href="https://wordpress.org/gutenberg">Gutenberg</a>.</p>
54
54
  <!-- /wp:paragraph -->"
55
55
  `;
56
56
 
@@ -62,12 +62,12 @@ exports[`Links can be removed 1`] = `
62
62
 
63
63
  exports[`Links should contain a label when it should open in a new tab 1`] = `
64
64
  "<!-- wp:paragraph -->
65
- <p>This is <a href=\\"http://w.org\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\">WordPress</a></p>
65
+ <p>This is <a href="http://w.org" target="_blank" rel="noreferrer noopener">WordPress</a></p>
66
66
  <!-- /wp:paragraph -->"
67
67
  `;
68
68
 
69
69
  exports[`Links should contain a label when it should open in a new tab 2`] = `
70
70
  "<!-- wp:paragraph -->
71
- <p>This is <a href=\\"http://wordpress.org\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\">WordPress</a></p>
71
+ <p>This is <a href="http://wordpress.org" target="_blank" rel="noreferrer noopener">WordPress</a></p>
72
72
  <!-- /wp:paragraph -->"
73
73
  `;
@@ -84,20 +84,20 @@ exports[`Multi-block selection should forward delete across blocks 1`] = `
84
84
  <!-- /wp:paragraph -->
85
85
 
86
86
  <!-- wp:heading -->
87
- <h2 class=\\"wp-block-heading\\">]2</h2>
87
+ <h2 class="wp-block-heading">]2</h2>
88
88
  <!-- /wp:heading -->"
89
89
  `;
90
90
 
91
91
  exports[`Multi-block selection should forward delete across blocks 2`] = `
92
92
  "<!-- wp:heading -->
93
- <h2 class=\\"wp-block-heading\\">1&amp;2</h2>
93
+ <h2 class="wp-block-heading">1&amp;2</h2>
94
94
  <!-- /wp:heading -->"
95
95
  `;
96
96
 
97
97
  exports[`Multi-block selection should gradually multi-select 1`] = `
98
98
  "<!-- wp:columns -->
99
- <div class=\\"wp-block-columns\\"><!-- wp:column -->
100
- <div class=\\"wp-block-column\\"><!-- wp:paragraph -->
99
+ <div class="wp-block-columns"><!-- wp:column -->
100
+ <div class="wp-block-column"><!-- wp:paragraph -->
101
101
  <p>1</p>
102
102
  <!-- /wp:paragraph -->
103
103
 
@@ -107,14 +107,14 @@ exports[`Multi-block selection should gradually multi-select 1`] = `
107
107
  <!-- /wp:column -->
108
108
 
109
109
  <!-- wp:column -->
110
- <div class=\\"wp-block-column\\"></div>
110
+ <div class="wp-block-column"></div>
111
111
  <!-- /wp:column --></div>
112
112
  <!-- /wp:columns -->"
113
113
  `;
114
114
 
115
115
  exports[`Multi-block selection should gradually multi-select 2`] = `
116
116
  "<!-- wp:columns -->
117
- <div class=\\"wp-block-columns\\"></div>
117
+ <div class="wp-block-columns"></div>
118
118
  <!-- /wp:columns -->"
119
119
  `;
120
120
 
@@ -128,7 +128,7 @@ exports[`Multi-block selection should handle Enter across blocks 1`] = `
128
128
  <!-- /wp:paragraph -->
129
129
 
130
130
  <!-- wp:heading -->
131
- <h2 class=\\"wp-block-heading\\">]2</h2>
131
+ <h2 class="wp-block-heading">]2</h2>
132
132
  <!-- /wp:heading -->"
133
133
  `;
134
134
 
@@ -142,7 +142,7 @@ exports[`Multi-block selection should handle Enter across blocks 2`] = `
142
142
  <!-- /wp:paragraph -->
143
143
 
144
144
  <!-- wp:heading -->
145
- <h2 class=\\"wp-block-heading\\">2</h2>
145
+ <h2 class="wp-block-heading">2</h2>
146
146
  <!-- /wp:heading -->"
147
147
  `;
148
148
 
@@ -251,8 +251,8 @@ exports[`Multi-block selection should preserve dragged selection on move 1`] = `
251
251
  `;
252
252
 
253
253
  exports[`Multi-block selection should properly select multiple blocks if selected nested blocks belong to different parent 1`] = `
254
- "<!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
255
- <div class=\\"wp-block-group\\"><!-- wp:paragraph -->
254
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
255
+ <div class="wp-block-group"><!-- wp:paragraph -->
256
256
  <p>first</p>
257
257
  <!-- /wp:paragraph -->
258
258
 
@@ -261,8 +261,8 @@ exports[`Multi-block selection should properly select multiple blocks if selecte
261
261
  <!-- /wp:paragraph --></div>
262
262
  <!-- /wp:group -->
263
263
 
264
- <!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
265
- <div class=\\"wp-block-group\\"><!-- wp:paragraph -->
264
+ <!-- wp:group {"layout":{"type":"constrained"}} -->
265
+ <div class="wp-block-group"><!-- wp:paragraph -->
266
266
  <p>second</p>
267
267
  <!-- /wp:paragraph -->
268
268
 
@@ -300,7 +300,7 @@ exports[`Multi-block selection should select separator (single element block) 1`
300
300
  <!-- /wp:paragraph -->
301
301
 
302
302
  <!-- wp:separator -->
303
- <hr class=\\"wp-block-separator has-alpha-channel-opacity\\"/>
303
+ <hr class="wp-block-separator has-alpha-channel-opacity"/>
304
304
  <!-- /wp:separator -->"
305
305
  `;
306
306
 
@@ -311,12 +311,12 @@ exports[`Multi-block selection should select separator (single element block) 2`
311
311
  `;
312
312
 
313
313
  exports[`Multi-block selection should set attributes for multiple paragraphs 1`] = `
314
- "<!-- wp:paragraph {\\"align\\":\\"center\\"} -->
315
- <p class=\\"has-text-align-center\\">1</p>
314
+ "<!-- wp:paragraph {"align":"center"} -->
315
+ <p class="has-text-align-center">1</p>
316
316
  <!-- /wp:paragraph -->
317
317
 
318
- <!-- wp:paragraph {\\"align\\":\\"center\\"} -->
319
- <p class=\\"has-text-align-center\\">2</p>
318
+ <!-- wp:paragraph {"align":"center"} -->
319
+ <p class="has-text-align-center">2</p>
320
320
  <!-- /wp:paragraph -->"
321
321
  `;
322
322
 
@@ -31,8 +31,8 @@ exports[`RichText should handle Home and End keys 1`] = `
31
31
  `;
32
32
 
33
33
  exports[`RichText should handle change in tag name gracefully 1`] = `
34
- "<!-- wp:heading {\\"level\\":3} -->
35
- <h3 class=\\"wp-block-heading\\"></h3>
34
+ "<!-- wp:heading {"level":3} -->
35
+ <h3 class="wp-block-heading"></h3>
36
36
  <!-- /wp:heading -->"
37
37
  `;
38
38
 
@@ -136,17 +136,17 @@ exports[`RichText should paste paragraph contents into list 1`] = `
136
136
 
137
137
  exports[`RichText should preserve internal formatting 1`] = `
138
138
  "<!-- wp:paragraph -->
139
- <p><mark style=\\"background-color:rgba(0, 0, 0, 0)\\" class=\\"has-inline-color has-cyan-bluish-gray-color\\">1</mark></p>
139
+ <p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-cyan-bluish-gray-color">1</mark></p>
140
140
  <!-- /wp:paragraph -->"
141
141
  `;
142
142
 
143
143
  exports[`RichText should preserve internal formatting 2`] = `
144
144
  "<!-- wp:paragraph -->
145
- <p><mark style=\\"background-color:rgba(0, 0, 0, 0)\\" class=\\"has-inline-color has-cyan-bluish-gray-color\\">1</mark></p>
145
+ <p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-cyan-bluish-gray-color">1</mark></p>
146
146
  <!-- /wp:paragraph -->
147
147
 
148
148
  <!-- wp:paragraph -->
149
- <p><mark style=\\"background-color:rgba(0, 0, 0, 0)\\" class=\\"has-inline-color has-cyan-bluish-gray-color\\">1</mark></p>
149
+ <p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-cyan-bluish-gray-color">1</mark></p>
150
150
  <!-- /wp:paragraph -->"
151
151
  `;
152
152
 
@@ -148,9 +148,9 @@ describe( 'Block Grouping', () => {
148
148
  await clickBlockToolbarButton( 'Options' );
149
149
  await clickMenuItem( 'Group' );
150
150
  expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
151
- "<!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
152
- <div class=\\"wp-block-group\\"><!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
153
- <div class=\\"wp-block-group\\"><!-- wp:paragraph -->
151
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
152
+ <div class="wp-block-group"><!-- wp:group {"layout":{"type":"constrained"}} -->
153
+ <div class="wp-block-group"><!-- wp:paragraph -->
154
154
  <p>1</p>
155
155
  <!-- /wp:paragraph --></div>
156
156
  <!-- /wp:group --></div>
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`RichText should remove highlighting element 1`] = `
4
4
  "<!-- wp:paragraph -->
5
- <p><mark style=\\"background-color:rgba(0, 0, 0, 0)\\" class=\\"has-inline-color has-cyan-bluish-gray-color\\">1</mark></p>
5
+ <p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-cyan-bluish-gray-color">1</mark></p>
6
6
  <!-- /wp:paragraph -->"
7
7
  `;
8
8
 
@@ -529,7 +529,7 @@ describe( 'Links', () => {
529
529
  await waitForURLFieldAutoFocus();
530
530
  await page.keyboard.type( 'w.org' );
531
531
 
532
- // Toggle link settings open
532
+ // Link settings open
533
533
  await page.keyboard.press( 'Tab' );
534
534
  await page.keyboard.press( 'Space' );
535
535
 
@@ -605,7 +605,7 @@ describe( 'Links', () => {
605
605
  await pressKeyWithModifier( 'primary', 'K' );
606
606
 
607
607
  const [ settingsToggle ] = await page.$x(
608
- '//button[contains(@aria-label, "Toggle link settings")]'
608
+ '//button[contains(@aria-label, "Link Settings")]'
609
609
  );
610
610
  await settingsToggle.click();
611
611
 
@@ -638,7 +638,7 @@ describe( 'Links', () => {
638
638
  await waitForURLFieldAutoFocus();
639
639
 
640
640
  const [ settingsToggle ] = await page.$x(
641
- '//button[contains(@aria-label, "Toggle link settings")]'
641
+ '//button[contains(@aria-label, "Link Settings")]'
642
642
  );
643
643
  await settingsToggle.click();
644
644
 
@@ -702,7 +702,7 @@ describe( 'Links', () => {
702
702
  await waitForURLFieldAutoFocus();
703
703
 
704
704
  const [ settingsToggle ] = await page.$x(
705
- '//button[contains(@aria-label, "Toggle link settings")]'
705
+ '//button[contains(@aria-label, "Link Settings")]'
706
706
  );
707
707
  await settingsToggle.click();
708
708
 
@@ -737,7 +737,7 @@ describe( 'Links', () => {
737
737
  await waitForURLFieldAutoFocus();
738
738
 
739
739
  const [ settingsToggle ] = await page.$x(
740
- '//button[contains(@aria-label, "Toggle link settings")]'
740
+ '//button[contains(@aria-label, "Link Settings")]'
741
741
  );
742
742
  await settingsToggle.click();
743
743
 
@@ -788,7 +788,7 @@ describe( 'Links', () => {
788
788
  await waitForURLFieldAutoFocus();
789
789
 
790
790
  const [ settingsToggle ] = await page.$x(
791
- '//button[contains(@aria-label, "Toggle link settings")]'
791
+ '//button[contains(@aria-label, "Link Settings")]'
792
792
  );
793
793
  await settingsToggle.click();
794
794
 
@@ -1001,7 +1001,7 @@ describe( 'Links', () => {
1001
1001
 
1002
1002
  await waitForURLFieldAutoFocus();
1003
1003
 
1004
- // Toggle link settings open
1004
+ // Link settings open
1005
1005
  await page.keyboard.press( 'Tab' );
1006
1006
  await page.keyboard.press( 'Space' );
1007
1007
 
@@ -359,8 +359,8 @@ describe( 'Multi-block selection', () => {
359
359
  await page.mouse.up();
360
360
  await page.keyboard.type( 'hi' );
361
361
  expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
362
- "<!-- wp:group {\\"layout\\":{\\"type\\":\\"constrained\\"}} -->
363
- <div class=\\"wp-block-group\\"><!-- wp:paragraph -->
362
+ "<!-- wp:group {"layout":{"type":"constrained"}} -->
363
+ <div class="wp-block-group"><!-- wp:paragraph -->
364
364
  <p>hih text in group</p>
365
365
  <!-- /wp:paragraph --></div>
366
366
  <!-- /wp:group -->"
@@ -13,6 +13,7 @@ describe( 'Front End Performance', () => {
13
13
  const results = {
14
14
  timeToFirstByte: [],
15
15
  largestContentfulPaint: [],
16
+ lcpMinusTtfb: [],
16
17
  };
17
18
 
18
19
  beforeAll( async () => {
@@ -29,24 +30,7 @@ describe( 'Front End Performance', () => {
29
30
  );
30
31
  } );
31
32
 
32
- it( 'Time To First Byte (TTFB)', async () => {
33
- // We derive the 75th percentile of the TTFB based on these results.
34
- // By running it 16 times, the percentile value would be (75/100)*16=12,
35
- // meaning that we discard the worst 4 values.
36
- let i = 16;
37
- while ( i-- ) {
38
- await page.goto( createURL( '/' ) );
39
- const navigationTimingJson = await page.evaluate( () =>
40
- JSON.stringify( performance.getEntriesByType( 'navigation' ) )
41
- );
42
- const [ navigationTiming ] = JSON.parse( navigationTimingJson );
43
- results.timeToFirstByte.push(
44
- navigationTiming.responseStart - navigationTiming.startTime
45
- );
46
- }
47
- } );
48
-
49
- it( 'Largest Contentful Paint (LCP)', async () => {
33
+ it( 'Report TTFB, LCP, and LCP-TTFB', async () => {
50
34
  // Based on https://addyosmani.com/blog/puppeteer-recipes/#performance-observer-lcp
51
35
  function calcLCP() {
52
36
  // By using -1 we know when it didn't record any event.
@@ -74,9 +58,6 @@ describe( 'Front End Performance', () => {
74
58
  } );
75
59
  }
76
60
 
77
- // We derive the 75th percentile of the TTFB based on these results.
78
- // By running it 16 times, the percentile value would be (75/100)*16=12,
79
- // meaning that we discard the worst 4 values.
80
61
  let i = 16;
81
62
  while ( i-- ) {
82
63
  await page.evaluateOnNewDocument( calcLCP );
@@ -85,10 +66,18 @@ describe( 'Front End Performance', () => {
85
66
  // https://pptr.dev/api/puppeteer.page.goto#remarks
86
67
  await page.goto( createURL( '/' ), { waitUntil: 'networkidle0' } );
87
68
 
88
- const lcp = await page.evaluate(
89
- () => window.largestContentfulPaint
90
- );
69
+ const { lcp, ttfb } = await page.evaluate( () => {
70
+ const [ { responseStart, startTime } ] =
71
+ performance.getEntriesByType( 'navigation' );
72
+ return {
73
+ lcp: window.largestContentfulPaint,
74
+ ttfb: responseStart - startTime,
75
+ };
76
+ } );
77
+
91
78
  results.largestContentfulPaint.push( lcp );
79
+ results.timeToFirstByte.push( ttfb );
80
+ results.lcpMinusTtfb.push( lcp - ttfb );
92
81
  }
93
82
  } );
94
83
  } );