@wordpress/e2e-tests 6.3.5 → 6.5.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 +4 -0
- package/config/setup-performance-test.js +14 -7
- package/jest.config.js +4 -0
- package/package.json +7 -7
- package/specs/editor/blocks/pullquote.test.js +3 -3
- package/specs/editor/plugins/__snapshots__/align-hook.test.js.snap +11 -11
- package/specs/editor/plugins/__snapshots__/container-blocks.test.js.snap +14 -14
- package/specs/editor/plugins/__snapshots__/cpt-locking.test.js.snap +29 -29
- package/specs/editor/plugins/__snapshots__/iframed-inline-styles.test.js.snap +1 -1
- package/specs/editor/plugins/__snapshots__/iframed-masonry-block.test.js.snap +1 -1
- package/specs/editor/plugins/__snapshots__/inner-blocks-render-appender.test.js.snap +5 -5
- package/specs/editor/plugins/__snapshots__/plugins-api.test.js.snap +2 -2
- package/specs/editor/various/__snapshots__/adding-patterns.test.js.snap +4 -4
- package/specs/editor/various/__snapshots__/block-grouping.test.js.snap +21 -21
- package/specs/editor/various/__snapshots__/block-hierarchy-navigation.test.js.snap +12 -12
- package/specs/editor/various/__snapshots__/embedding.test.js.snap +19 -19
- package/specs/editor/various/__snapshots__/inserting-blocks.test.js.snap +8 -8
- package/specs/editor/various/__snapshots__/keep-styles-on-block-transforms.test.js.snap +11 -11
- package/specs/editor/various/__snapshots__/links.test.js.snap +9 -9
- package/specs/editor/various/__snapshots__/multi-block-selection.test.js.snap +17 -17
- package/specs/editor/various/__snapshots__/rich-text.test.js.snap +5 -5
- package/specs/editor/various/block-grouping.test.js +3 -3
- package/specs/editor/various/format-library/__snapshots__/text-color.test.js.snap +1 -1
- package/specs/editor/various/links.test.js +50 -16
- package/specs/editor/various/multi-block-selection.test.js +2 -2
- package/specs/performance/front-end-block-theme.test.js +48 -12
- package/specs/performance/front-end-classic-theme.test.js +50 -13
- package/specs/performance/post-editor.test.js +45 -28
- package/specs/performance/site-editor.test.js +69 -42
- package/specs/performance/utils.js +12 -1
- package/specs/widgets/editing-widgets.test.js +20 -15
- package/specs/editor/blocks/__snapshots__/heading.test.js.snap +0 -51
- package/specs/editor/blocks/__snapshots__/navigation.test.js.snap +0 -47
- package/specs/editor/blocks/heading.test.js +0 -113
- package/specs/editor/blocks/navigation.test.js +0 -1723
- package/specs/editor/blocks/query.test.js +0 -66
- package/specs/editor/various/__snapshots__/block-deletion.test.js.snap +0 -111
- package/specs/editor/various/__snapshots__/list-view.test.js.snap +0 -15
- package/specs/editor/various/block-deletion.test.js +0 -209
- package/specs/editor/various/list-view.test.js +0 -330
- package/specs/editor/various/switch-to-draft.test.js +0 -254
@@ -1,13 +1,13 @@
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
2
|
|
3
3
|
exports[`Block Grouping Group creation creates a group from multiple blocks of different types via block transforms 1`] = `
|
4
|
-
"<!-- wp:group {
|
5
|
-
<div class
|
6
|
-
<h2 class
|
4
|
+
"<!-- wp:group {"layout":{"type":"constrained"}} -->
|
5
|
+
<div class="wp-block-group"><!-- wp:heading -->
|
6
|
+
<h2 class="wp-block-heading">Group Heading</h2>
|
7
7
|
<!-- /wp:heading -->
|
8
8
|
|
9
9
|
<!-- wp:image -->
|
10
|
-
<figure class
|
10
|
+
<figure class="wp-block-image"><img alt=""/></figure>
|
11
11
|
<!-- /wp:image -->
|
12
12
|
|
13
13
|
<!-- wp:paragraph -->
|
@@ -17,8 +17,8 @@ exports[`Block Grouping Group creation creates a group from multiple blocks of d
|
|
17
17
|
`;
|
18
18
|
|
19
19
|
exports[`Block Grouping Group creation creates a group from multiple blocks of the same type via block transforms 1`] = `
|
20
|
-
"<!-- wp:group {
|
21
|
-
<div class
|
20
|
+
"<!-- wp:group {"layout":{"type":"constrained"}} -->
|
21
|
+
<div class="wp-block-group"><!-- wp:paragraph -->
|
22
22
|
<p>First Paragraph</p>
|
23
23
|
<!-- /wp:paragraph -->
|
24
24
|
|
@@ -33,8 +33,8 @@ exports[`Block Grouping Group creation creates a group from multiple blocks of t
|
|
33
33
|
`;
|
34
34
|
|
35
35
|
exports[`Block Grouping Group creation creates a group from multiple blocks of the same type via options toolbar 1`] = `
|
36
|
-
"<!-- wp:group {
|
37
|
-
<div class
|
36
|
+
"<!-- wp:group {"layout":{"type":"constrained"}} -->
|
37
|
+
<div class="wp-block-group"><!-- wp:paragraph -->
|
38
38
|
<p>First Paragraph</p>
|
39
39
|
<!-- /wp:paragraph -->
|
40
40
|
|
@@ -49,13 +49,13 @@ exports[`Block Grouping Group creation creates a group from multiple blocks of t
|
|
49
49
|
`;
|
50
50
|
|
51
51
|
exports[`Block Grouping Group creation groups and ungroups multiple blocks of different types via options toolbar 1`] = `
|
52
|
-
"<!-- wp:group {
|
53
|
-
<div class
|
54
|
-
<h2 class
|
52
|
+
"<!-- wp:group {"layout":{"type":"constrained"}} -->
|
53
|
+
<div class="wp-block-group"><!-- wp:heading -->
|
54
|
+
<h2 class="wp-block-heading">Group Heading</h2>
|
55
55
|
<!-- /wp:heading -->
|
56
56
|
|
57
57
|
<!-- wp:image -->
|
58
|
-
<figure class
|
58
|
+
<figure class="wp-block-image"><img alt=""/></figure>
|
59
59
|
<!-- /wp:image -->
|
60
60
|
|
61
61
|
<!-- wp:paragraph -->
|
@@ -66,11 +66,11 @@ exports[`Block Grouping Group creation groups and ungroups multiple blocks of di
|
|
66
66
|
|
67
67
|
exports[`Block Grouping Group creation groups and ungroups multiple blocks of different types via options toolbar 2`] = `
|
68
68
|
"<!-- wp:heading -->
|
69
|
-
<h2 class
|
69
|
+
<h2 class="wp-block-heading">Group Heading</h2>
|
70
70
|
<!-- /wp:heading -->
|
71
71
|
|
72
72
|
<!-- wp:image -->
|
73
|
-
<figure class
|
73
|
+
<figure class="wp-block-image"><img alt=""/></figure>
|
74
74
|
<!-- /wp:image -->
|
75
75
|
|
76
76
|
<!-- wp:paragraph -->
|
@@ -79,17 +79,17 @@ exports[`Block Grouping Group creation groups and ungroups multiple blocks of di
|
|
79
79
|
`;
|
80
80
|
|
81
81
|
exports[`Block Grouping Preserving selected blocks attributes preserves width alignment settings of selected blocks 1`] = `
|
82
|
-
"<!-- wp:group {
|
83
|
-
<div class
|
84
|
-
<h2 class
|
82
|
+
"<!-- wp:group {"align":"full","layout":{"type":"constrained"}} -->
|
83
|
+
<div class="wp-block-group alignfull"><!-- wp:heading -->
|
84
|
+
<h2 class="wp-block-heading">Group Heading</h2>
|
85
85
|
<!-- /wp:heading -->
|
86
86
|
|
87
|
-
<!-- wp:image {
|
88
|
-
<figure class
|
87
|
+
<!-- wp:image {"align":"full"} -->
|
88
|
+
<figure class="wp-block-image alignfull"><img alt=""/></figure>
|
89
89
|
<!-- /wp:image -->
|
90
90
|
|
91
|
-
<!-- wp:image {
|
92
|
-
<figure class
|
91
|
+
<!-- wp:image {"align":"wide"} -->
|
92
|
+
<figure class="wp-block-image alignwide"><img alt=""/></figure>
|
93
93
|
<!-- /wp:image -->
|
94
94
|
|
95
95
|
<!-- wp:paragraph -->
|
@@ -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
|
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
|
16
|
-
<div class
|
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
|
22
|
+
<div class="wp-block-column"></div>
|
23
23
|
<!-- /wp:column -->
|
24
24
|
|
25
25
|
<!-- wp:column -->
|
26
|
-
<div class
|
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
|
36
|
-
<div class
|
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
|
42
|
+
<div class="wp-block-column"></div>
|
43
43
|
<!-- /wp:column -->
|
44
44
|
|
45
45
|
<!-- wp:column -->
|
46
|
-
<div class
|
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 {
|
55
|
-
<div class
|
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
|
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
|
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 {
|
11
|
-
<figure class
|
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 {
|
19
|
-
<figure class
|
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 {
|
25
|
-
<figure class
|
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 {
|
31
|
-
<figure class
|
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 {
|
37
|
-
<figure class
|
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 {
|
43
|
-
<figure class
|
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 {
|
49
|
-
<figure class
|
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 {
|
55
|
-
<figure class
|
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 {
|
63
|
-
<figure class
|
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 {
|
58
|
-
<div class
|
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
|
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 {
|
92
|
-
<div class
|
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
|
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
|
111
|
-
<div class
|
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 {
|
5
|
-
<p class
|
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 {
|
11
|
-
<h2 class
|
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 {
|
15
|
-
<h2 class
|
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 {
|
19
|
-
<h2 class
|
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 {
|
25
|
-
<div class
|
26
|
-
<p class
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
93
|
+
<h2 class="wp-block-heading">1&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
|
100
|
-
<div class
|
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
|
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
|
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
|
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
|
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 {
|
255
|
-
<div class
|
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 {
|
265
|
-
<div class
|
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
|
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 {
|
315
|
-
<p class
|
314
|
+
"<!-- wp:paragraph {"align":"center"} -->
|
315
|
+
<p class="has-text-align-center">1</p>
|
316
316
|
<!-- /wp:paragraph -->
|
317
317
|
|
318
|
-
<!-- wp:paragraph {
|
319
|
-
<p class
|
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 {
|
35
|
-
<h3 class
|
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
|
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
|
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
|
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 {
|
152
|
-
<div class
|
153
|
-
<div class
|
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
|
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
|
|