@wordpress/e2e-tests 4.7.0 → 4.9.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 (31) hide show
  1. package/README.md +8 -8
  2. package/package.json +6 -6
  3. package/plugins/cpt-locking.php +28 -4
  4. package/specs/editor/blocks/__snapshots__/quote.test.js.snap +37 -131
  5. package/specs/editor/blocks/navigation.test.js +2 -1
  6. package/specs/editor/blocks/quote.test.js +42 -91
  7. package/specs/editor/plugins/__snapshots__/cpt-locking.test.js.snap +24 -8
  8. package/specs/editor/plugins/__snapshots__/inner-blocks-render-appender.test.js.snap +6 -2
  9. package/specs/editor/plugins/__snapshots__/templates.test.js.snap +6 -2
  10. package/specs/editor/plugins/block-variations.test.js +2 -0
  11. package/specs/editor/plugins/cpt-locking.test.js +3 -3
  12. package/specs/editor/plugins/inner-blocks-render-appender.test.js +3 -0
  13. package/specs/editor/various/__snapshots__/multi-block-selection.test.js.snap +0 -16
  14. package/specs/editor/various/__snapshots__/rich-text.test.js.snap +12 -0
  15. package/specs/editor/various/__snapshots__/writing-flow.test.js.snap +3 -3
  16. package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +1 -1
  17. package/specs/editor/various/block-switcher.test.js +1 -3
  18. package/specs/editor/various/multi-block-selection.test.js +2 -27
  19. package/specs/editor/various/reusable-blocks.test.js +4 -2
  20. package/specs/editor/various/rich-text.test.js +17 -0
  21. package/specs/editor/various/writing-flow.test.js +74 -1
  22. package/specs/site-editor/multi-entity-saving.test.js +3 -3
  23. package/specs/editor/blocks/__snapshots__/group.test.js.snap +0 -21
  24. package/specs/editor/blocks/group.test.js +0 -43
  25. package/specs/editor/blocks/missing.test.js +0 -44
  26. package/specs/editor/plugins/__snapshots__/deprecated-node-matcher.test.js.snap +0 -13
  27. package/specs/editor/plugins/__snapshots__/hooks-api.test.js.snap +0 -3
  28. package/specs/editor/plugins/deprecated-node-matcher.test.js +0 -44
  29. package/specs/editor/plugins/hooks-api.test.js +0 -44
  30. package/specs/editor/various/__snapshots__/convert-block-type.test.js.snap +0 -13
  31. package/specs/editor/various/convert-block-type.test.js +0 -32
package/README.md CHANGED
@@ -18,30 +18,30 @@ The following commands are available on the Gutenberg repo:
18
18
 
19
19
  ```json
20
20
  {
21
- "test-e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js",
22
- "test-e2e:debug": "wp-scripts --inspect-brk test-e2e --config packages/e2e-tests/jest.config.js --puppeteer-devtools",
23
- "test-e2e:watch": "npm run test-e2e -- --watch"
21
+ "test:e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js",
22
+ "test:e2e:debug": "wp-scripts --inspect-brk test-e2e --config packages/e2e-tests/jest.config.js --puppeteer-devtools",
23
+ "test:e2e:watch": "npm run test:e2e -- --watch"
24
24
  }
25
25
  ```
26
26
 
27
27
  ### Run all available tests
28
28
 
29
29
  ```bash
30
- npm run test-e2e
30
+ npm run test:e2e
31
31
  ```
32
32
 
33
33
  ### Run all available tests and listen for changes.
34
34
 
35
35
  ```bash
36
- npm run test-e2e:watch
36
+ npm run test:e2e:watch
37
37
  ```
38
38
 
39
39
  ### Run a specific test file
40
40
 
41
41
  ```bash
42
- npm run test-e2e -- packages/e2e-test/<path_to_test_file>
42
+ npm run test:e2e -- packages/e2e-test/<path_to_test_file>
43
43
  # Or, in order to watch for changes:
44
- npm run test-e2e:watch -- packages/e2e-test/<path_to_test_file>
44
+ npm run test:e2e:watch -- packages/e2e-test/<path_to_test_file>
45
45
  ```
46
46
 
47
47
  ### Debugging
@@ -49,7 +49,7 @@ npm run test-e2e:watch -- packages/e2e-test/<path_to_test_file>
49
49
  Makes e2e tests available to debug in a Chrome Browser.
50
50
 
51
51
  ```bash
52
- npm run test-e2e:debug
52
+ npm run test:e2e:debug
53
53
  ```
54
54
 
55
55
  After running the command, tests will be available for debugging in Chrome by going to chrome://inspect/#devices and clicking `inspect` under the path to `/test-e2e.js`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "4.7.0",
3
+ "version": "4.9.1",
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.9.0",
26
+ "@wordpress/e2e-test-utils": "^7.11.0",
27
27
  "@wordpress/jest-console": "^5.4.0",
28
- "@wordpress/jest-puppeteer-axe": "^4.0.2",
29
- "@wordpress/scripts": "^23.5.0",
30
- "@wordpress/url": "^3.14.0",
28
+ "@wordpress/jest-puppeteer-axe": "^4.1.0",
29
+ "@wordpress/scripts": "^23.7.1",
30
+ "@wordpress/url": "^3.16.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": "9d9d33bbdf317a4381b8ca1713e43bb50df653b3"
49
+ "gitHead": "e79de3dcf537de9d27ee2fb24b6ecfcb68f825a4"
50
50
  }
@@ -19,7 +19,13 @@ function gutenberg_test_cpt_locking() {
19
19
  'placeholder' => 'Add a description',
20
20
  ),
21
21
  ),
22
- array( 'core/quote' ),
22
+ array(
23
+ 'core/quote',
24
+ array(),
25
+ array(
26
+ array( 'core/paragraph' ),
27
+ ),
28
+ ),
23
29
  array( 'core/columns' ),
24
30
  );
25
31
  register_post_type(
@@ -65,7 +71,13 @@ function gutenberg_test_cpt_locking() {
65
71
  'templateLock' => false,
66
72
  ),
67
73
  array(
68
- array( 'core/quote' ),
74
+ array(
75
+ 'core/quote',
76
+ array(),
77
+ array(
78
+ array( 'core/paragraph' ),
79
+ ),
80
+ ),
69
81
  array(
70
82
  'core/paragraph',
71
83
  array(
@@ -91,7 +103,13 @@ function gutenberg_test_cpt_locking() {
91
103
  'templateLock' => 'all',
92
104
  ),
93
105
  array(
94
- array( 'core/quote' ),
106
+ array(
107
+ 'core/quote',
108
+ array(),
109
+ array(
110
+ array( 'core/paragraph' ),
111
+ ),
112
+ ),
95
113
  array(
96
114
  'core/paragraph',
97
115
  array(
@@ -115,7 +133,13 @@ function gutenberg_test_cpt_locking() {
115
133
  'core/group',
116
134
  array(),
117
135
  array(
118
- array( 'core/quote' ),
136
+ array(
137
+ 'core/quote',
138
+ array(),
139
+ array(
140
+ array( 'core/paragraph' ),
141
+ ),
142
+ ),
119
143
  array(
120
144
  'core/paragraph',
121
145
  array(
@@ -34,180 +34,86 @@ exports[`Quote can be converted to paragraphs and renders one paragraph block pe
34
34
 
35
35
  exports[`Quote can be converted to paragraphs and renders only one paragraph for the cite, if the quote is void 1`] = `
36
36
  "<!-- wp:paragraph -->
37
+ <p></p>
38
+ <!-- /wp:paragraph -->
39
+
40
+ <!-- wp:paragraph -->
37
41
  <p>cite</p>
38
42
  <!-- /wp:paragraph -->"
39
43
  `;
40
44
 
41
45
  exports[`Quote can be created by converting a heading 1`] = `
42
46
  "<!-- wp:quote -->
43
- <blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
47
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:heading -->
48
+ <h2>test</h2>
49
+ <!-- /wp:heading --></blockquote>
44
50
  <!-- /wp:quote -->"
45
51
  `;
46
52
 
47
53
  exports[`Quote can be created by converting a paragraph 1`] = `
48
54
  "<!-- wp:quote -->
49
- <blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
55
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
56
+ <p>test</p>
57
+ <!-- /wp:paragraph --></blockquote>
50
58
  <!-- /wp:quote -->"
51
59
  `;
52
60
 
53
61
  exports[`Quote can be created by converting multiple paragraphs 1`] = `
54
62
  "<!-- wp:quote -->
55
- <blockquote class=\\"wp-block-quote\\"><p>one</p><p>two</p></blockquote>
63
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
64
+ <p>one</p>
65
+ <!-- /wp:paragraph -->
66
+
67
+ <!-- wp:paragraph -->
68
+ <p>two</p>
69
+ <!-- /wp:paragraph --></blockquote>
56
70
  <!-- /wp:quote -->"
57
71
  `;
58
72
 
59
73
  exports[`Quote can be created by typing "/quote" 1`] = `
60
74
  "<!-- wp:quote -->
61
- <blockquote class=\\"wp-block-quote\\"><p>I’m a quote</p></blockquote>
75
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
76
+ <p>I’m a quote</p>
77
+ <!-- /wp:paragraph --></blockquote>
62
78
  <!-- /wp:quote -->"
63
79
  `;
64
80
 
65
81
  exports[`Quote can be created by typing > in front of text of a paragraph block 1`] = `
66
82
  "<!-- wp:quote -->
67
- <blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
83
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
84
+ <p>test</p>
85
+ <!-- /wp:paragraph --></blockquote>
68
86
  <!-- /wp:quote -->"
69
87
  `;
70
88
 
71
89
  exports[`Quote can be created by using > at the start of a paragraph block 1`] = `
72
90
  "<!-- wp:quote -->
73
- <blockquote class=\\"wp-block-quote\\"><p>A quote</p><p>Another paragraph</p></blockquote>
74
- <!-- /wp:quote -->"
75
- `;
76
-
77
- exports[`Quote can be merged into from a paragraph 1`] = `
78
- "<!-- wp:quote -->
79
- <blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
80
- <!-- /wp:quote -->"
81
- `;
82
-
83
- exports[`Quote can be split at the end and merged back 1`] = `
84
- "<!-- wp:quote -->
85
- <blockquote class=\\"wp-block-quote\\"><p>1</p></blockquote>
86
- <!-- /wp:quote -->
91
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
92
+ <p>A quote</p>
93
+ <!-- /wp:paragraph -->
87
94
 
88
95
  <!-- wp:paragraph -->
89
- <p></p>
90
- <!-- /wp:paragraph -->"
91
- `;
92
-
93
- exports[`Quote can be split at the end and merged back 2`] = `
94
- "<!-- wp:quote -->
95
- <blockquote class=\\"wp-block-quote\\"><p>1</p><p></p></blockquote>
96
+ <p>Another paragraph</p>
97
+ <!-- /wp:paragraph --></blockquote>
96
98
  <!-- /wp:quote -->"
97
99
  `;
98
100
 
99
- exports[`Quote can be split at the end and merged back 3`] = `
101
+ exports[`Quote can be split at the end 1`] = `
100
102
  "<!-- wp:quote -->
101
- <blockquote class=\\"wp-block-quote\\"><p>1</p></blockquote>
102
- <!-- /wp:quote -->"
103
- `;
104
-
105
- exports[`Quote can be split in the middle and merged back 1`] = `
106
- "<!-- wp:quote -->
107
- <blockquote class=\\"wp-block-quote\\"><p>1</p><cite>c</cite></blockquote>
103
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
104
+ <p>1</p>
105
+ <!-- /wp:paragraph --></blockquote>
108
106
  <!-- /wp:quote -->
109
107
 
110
108
  <!-- wp:paragraph -->
111
109
  <p></p>
112
- <!-- /wp:paragraph -->
113
-
114
- <!-- wp:quote -->
115
- <blockquote class=\\"wp-block-quote\\"><p>2</p><cite>c</cite></blockquote>
116
- <!-- /wp:quote -->"
117
- `;
118
-
119
- exports[`Quote can be split in the middle and merged back 2`] = `
120
- "<!-- wp:quote -->
121
- <blockquote class=\\"wp-block-quote\\"><p>1</p><p></p><cite>c</cite></blockquote>
122
- <!-- /wp:quote -->
123
-
124
- <!-- wp:quote -->
125
- <blockquote class=\\"wp-block-quote\\"><p>2</p><cite>c</cite></blockquote>
126
- <!-- /wp:quote -->"
127
- `;
128
-
129
- exports[`Quote can be split in the middle and merged back 3`] = `
130
- "<!-- wp:quote -->
131
- <blockquote class=\\"wp-block-quote\\"><p>1</p><cite>c</cite></blockquote>
132
- <!-- /wp:quote -->
133
-
134
- <!-- wp:quote -->
135
- <blockquote class=\\"wp-block-quote\\"><p>2</p><cite>c</cite></blockquote>
136
- <!-- /wp:quote -->"
110
+ <!-- /wp:paragraph -->"
137
111
  `;
138
112
 
139
- exports[`Quote can be split in the middle and merged back 4`] = `
113
+ exports[`Quote can be split at the end 2`] = `
140
114
  "<!-- wp:quote -->
141
- <blockquote class=\\"wp-block-quote\\"><p>1</p><p>2</p><cite>c</cite></blockquote>
142
- <!-- /wp:quote -->"
143
- `;
144
-
145
- exports[`Quote is transformed to a heading and a quote if the quote contains a citation 1`] = `
146
- "<!-- wp:heading -->
147
- <h2>one</h2>
148
- <!-- /wp:heading -->
149
-
150
- <!-- wp:quote -->
151
- <blockquote class=\\"wp-block-quote\\"><p></p><cite>cite</cite></blockquote>
152
- <!-- /wp:quote -->"
153
- `;
154
-
155
- exports[`Quote is transformed to a heading and a quote if the quote contains multiple paragraphs 1`] = `
156
- "<!-- wp:heading -->
157
- <h2>one</h2>
158
- <!-- /wp:heading -->
159
-
160
- <!-- wp:quote -->
161
- <blockquote class=\\"wp-block-quote\\"><p>two</p><p>three</p></blockquote>
115
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
116
+ <p>1</p>
117
+ <!-- /wp:paragraph --></blockquote>
162
118
  <!-- /wp:quote -->"
163
119
  `;
164
-
165
- exports[`Quote is transformed to a heading if the quote just contains one paragraph 1`] = `
166
- "<!-- wp:heading -->
167
- <h2>one</h2>
168
- <!-- /wp:heading -->"
169
- `;
170
-
171
- exports[`Quote is transformed to an empty heading if the quote is empty 1`] = `
172
- "<!-- wp:heading -->
173
- <h2></h2>
174
- <!-- /wp:heading -->"
175
- `;
176
-
177
- exports[`Quote the resuling quote after transforming to a heading can be transformed again 1`] = `
178
- "<!-- wp:heading -->
179
- <h2>one</h2>
180
- <!-- /wp:heading -->
181
-
182
- <!-- wp:quote -->
183
- <blockquote class=\\"wp-block-quote\\"><p>two</p><cite>cite</cite></blockquote>
184
- <!-- /wp:quote -->"
185
- `;
186
-
187
- exports[`Quote the resuling quote after transforming to a heading can be transformed again 2`] = `
188
- "<!-- wp:heading -->
189
- <h2>one</h2>
190
- <!-- /wp:heading -->
191
-
192
- <!-- wp:heading -->
193
- <h2>two</h2>
194
- <!-- /wp:heading -->
195
-
196
- <!-- wp:quote -->
197
- <blockquote class=\\"wp-block-quote\\"><p></p><cite>cite</cite></blockquote>
198
- <!-- /wp:quote -->"
199
- `;
200
-
201
- exports[`Quote the resuling quote after transforming to a heading can be transformed again 3`] = `
202
- "<!-- wp:heading -->
203
- <h2>one</h2>
204
- <!-- /wp:heading -->
205
-
206
- <!-- wp:heading -->
207
- <h2>two</h2>
208
- <!-- /wp:heading -->
209
-
210
- <!-- wp:heading -->
211
- <h2>cite</h2>
212
- <!-- /wp:heading -->"
213
- `;
@@ -1317,9 +1317,10 @@ Expected mock function not to be called but it was called with: ["POST", "http:/
1317
1317
  await switchUserToAdmin();
1318
1318
  } );
1319
1319
 
1320
- it( 'shows a warning if user does not have permission to create navigation menus', async () => {
1320
+ it.skip( 'shows a warning if user does not have permission to create navigation menus', async () => {
1321
1321
  const noticeText =
1322
1322
  'You do not have permission to create Navigation Menus.';
1323
+
1323
1324
  // Switch to a Contributor role user - they should not have
1324
1325
  // permission to update Navigations.
1325
1326
  await loginUser( contributorUsername, contributorPassword );
@@ -77,7 +77,9 @@ describe( 'Quote', () => {
77
77
  await page.keyboard.type( 'one' );
78
78
  await page.keyboard.press( 'Enter' );
79
79
  await page.keyboard.type( 'two' );
80
- await transformBlockTo( 'Paragraph' );
80
+ // Navigate to the citation to select the block.
81
+ await page.keyboard.press( 'ArrowRight' );
82
+ await transformBlockTo( 'Unwrap' );
81
83
 
82
84
  expect( await getEditedPostContent() ).toMatchSnapshot();
83
85
  } );
@@ -89,7 +91,7 @@ describe( 'Quote', () => {
89
91
  await page.keyboard.type( 'two' );
90
92
  await page.keyboard.press( 'ArrowRight' );
91
93
  await page.keyboard.type( 'cite' );
92
- await transformBlockTo( 'Paragraph' );
94
+ await transformBlockTo( 'Unwrap' );
93
95
 
94
96
  expect( await getEditedPostContent() ).toMatchSnapshot();
95
97
  } );
@@ -98,14 +100,15 @@ describe( 'Quote', () => {
98
100
  await insertBlock( 'Quote' );
99
101
  await page.keyboard.press( 'ArrowRight' );
100
102
  await page.keyboard.type( 'cite' );
101
- await transformBlockTo( 'Paragraph' );
103
+ await transformBlockTo( 'Unwrap' );
102
104
 
103
105
  expect( await getEditedPostContent() ).toMatchSnapshot();
104
106
  } );
105
107
 
106
108
  it( 'and renders a void paragraph if both the cite and quote are void', async () => {
107
109
  await insertBlock( 'Quote' );
108
- await transformBlockTo( 'Paragraph' );
110
+ await page.keyboard.press( 'ArrowRight' ); // Select the quote
111
+ await transformBlockTo( 'Unwrap' );
109
112
 
110
113
  expect( await getEditedPostContent() ).toMatchSnapshot();
111
114
  } );
@@ -119,56 +122,6 @@ describe( 'Quote', () => {
119
122
  expect( await getEditedPostContent() ).toMatchSnapshot();
120
123
  } );
121
124
 
122
- it( 'is transformed to an empty heading if the quote is empty', async () => {
123
- await insertBlock( 'Quote' );
124
- await transformBlockTo( 'Heading' );
125
- expect( await getEditedPostContent() ).toMatchSnapshot();
126
- } );
127
-
128
- it( 'is transformed to a heading if the quote just contains one paragraph', async () => {
129
- await insertBlock( 'Quote' );
130
- await page.keyboard.type( 'one' );
131
- await transformBlockTo( 'Heading' );
132
- expect( await getEditedPostContent() ).toMatchSnapshot();
133
- } );
134
-
135
- it( 'is transformed to a heading and a quote if the quote contains multiple paragraphs', async () => {
136
- await insertBlock( 'Quote' );
137
- await page.keyboard.type( 'one' );
138
- await page.keyboard.press( 'Enter' );
139
- await page.keyboard.type( 'two' );
140
- await page.keyboard.press( 'Enter' );
141
- await page.keyboard.type( 'three' );
142
- await transformBlockTo( 'Heading' );
143
- expect( await getEditedPostContent() ).toMatchSnapshot();
144
- } );
145
-
146
- it( 'is transformed to a heading and a quote if the quote contains a citation', async () => {
147
- await insertBlock( 'Quote' );
148
- await page.keyboard.type( 'one' );
149
- await page.keyboard.press( 'ArrowRight' );
150
- await page.keyboard.type( 'cite' );
151
- await transformBlockTo( 'Heading' );
152
- expect( await getEditedPostContent() ).toMatchSnapshot();
153
- } );
154
-
155
- it( 'the resuling quote after transforming to a heading can be transformed again', async () => {
156
- await insertBlock( 'Quote' );
157
- await page.keyboard.type( 'one' );
158
- await page.keyboard.press( 'Enter' );
159
- await page.keyboard.type( 'two' );
160
- await page.keyboard.press( 'ArrowRight' );
161
- await page.keyboard.type( 'cite' );
162
- await transformBlockTo( 'Heading' );
163
- expect( await getEditedPostContent() ).toMatchSnapshot();
164
- await page.click( '[data-type="core/quote"]' );
165
- await transformBlockTo( 'Heading' );
166
- expect( await getEditedPostContent() ).toMatchSnapshot();
167
- await page.click( '[data-type="core/quote"]' );
168
- await transformBlockTo( 'Heading' );
169
- expect( await getEditedPostContent() ).toMatchSnapshot();
170
- } );
171
-
172
125
  it( 'can be converted to a pullquote', async () => {
173
126
  await insertBlock( 'Quote' );
174
127
  await page.keyboard.type( 'one' );
@@ -180,16 +133,7 @@ describe( 'Quote', () => {
180
133
  expect( await getEditedPostContent() ).toMatchSnapshot();
181
134
  } );
182
135
 
183
- it( 'can be merged into from a paragraph', async () => {
184
- await insertBlock( 'Quote' );
185
- await insertBlock( 'Paragraph' );
186
- await page.keyboard.type( 'test' );
187
- await pressKeyTimes( 'ArrowLeft', 'test'.length );
188
- await page.keyboard.press( 'Backspace' );
189
- expect( await getEditedPostContent() ).toMatchSnapshot();
190
- } );
191
-
192
- it( 'can be split at the end and merged back', async () => {
136
+ it( 'can be split at the end', async () => {
193
137
  await insertBlock( 'Quote' );
194
138
  await page.keyboard.type( '1' );
195
139
  await page.keyboard.press( 'Enter' );
@@ -200,46 +144,53 @@ describe( 'Quote', () => {
200
144
 
201
145
  await page.keyboard.press( 'Backspace' );
202
146
 
203
- // Expect empty paragraph inside quote block.
204
- expect( await getEditedPostContent() ).toMatchSnapshot();
205
-
206
- await page.keyboard.press( 'Backspace' );
207
-
208
- // Expect quote without empty paragraphs.
147
+ // Expect the paragraph to be deleted.
209
148
  expect( await getEditedPostContent() ).toMatchSnapshot();
210
149
  } );
211
150
 
212
- it( 'can be split in the middle and merged back', async () => {
151
+ it( 'can be unwrapped on Backspace', async () => {
213
152
  await insertBlock( 'Quote' );
214
- await page.keyboard.type( '1' );
215
- await page.keyboard.press( 'Enter' );
216
- await page.keyboard.type( '2' );
217
- await page.keyboard.press( 'ArrowRight' );
218
- await page.keyboard.type( 'c' );
219
- await page.keyboard.press( 'ArrowUp' );
220
- await page.keyboard.press( 'ArrowUp' );
221
- await page.keyboard.press( 'Enter' );
222
- await page.keyboard.press( 'Enter' );
223
153
 
224
- // Expect two quote blocks and empty paragraph in the middle.
225
- expect( await getEditedPostContent() ).toMatchSnapshot();
154
+ expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
155
+ "<!-- wp:quote -->
156
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
157
+ <p></p>
158
+ <!-- /wp:paragraph --></blockquote>
159
+ <!-- /wp:quote -->"
160
+ ` );
226
161
 
227
162
  await page.keyboard.press( 'Backspace' );
228
163
 
229
- // Expect two quote blocks and empty paragraph in the first quote.
230
- expect( await getEditedPostContent() ).toMatchSnapshot();
164
+ expect( await getEditedPostContent() ).toMatchInlineSnapshot( `""` );
165
+ } );
231
166
 
232
- await page.keyboard.press( 'Backspace' );
167
+ it( 'can be unwrapped with content on Backspace', async () => {
168
+ await insertBlock( 'Quote' );
169
+ await page.keyboard.type( '1' );
170
+ await page.keyboard.press( 'ArrowRight' );
171
+ await page.keyboard.type( '2' );
233
172
 
234
- // Expect two quote blocks.
235
- expect( await getEditedPostContent() ).toMatchSnapshot();
173
+ expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
174
+ "<!-- wp:quote -->
175
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
176
+ <p>1</p>
177
+ <!-- /wp:paragraph --><cite>2</cite></blockquote>
178
+ <!-- /wp:quote -->"
179
+ ` );
236
180
 
237
181
  await page.keyboard.press( 'ArrowLeft' );
238
- await page.keyboard.press( 'ArrowDown' );
239
- await page.keyboard.press( 'ArrowDown' );
240
- await page.keyboard.press( 'ArrowDown' );
182
+ await page.keyboard.press( 'ArrowUp' );
183
+ await page.keyboard.press( 'ArrowUp' );
241
184
  await page.keyboard.press( 'Backspace' );
242
185
 
243
- expect( await getEditedPostContent() ).toMatchSnapshot();
186
+ expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
187
+ "<!-- wp:paragraph -->
188
+ <p>1</p>
189
+ <!-- /wp:paragraph -->
190
+
191
+ <!-- wp:paragraph -->
192
+ <p>2</p>
193
+ <!-- /wp:paragraph -->"
194
+ ` );
244
195
  } );
245
196
  } );
@@ -10,7 +10,9 @@ exports[`cpt locking template_lock all should insert line breaks when using ente
10
10
  <!-- /wp:paragraph -->
11
11
 
12
12
  <!-- wp:quote -->
13
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
13
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
14
+ <p></p>
15
+ <!-- /wp:paragraph --></blockquote>
14
16
  <!-- /wp:quote -->
15
17
 
16
18
  <!-- wp:columns -->
@@ -28,7 +30,9 @@ exports[`cpt locking template_lock all should not error when deleting the cotent
28
30
  <!-- /wp:paragraph -->
29
31
 
30
32
  <!-- wp:quote -->
31
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
33
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
34
+ <p></p>
35
+ <!-- /wp:paragraph --></blockquote>
32
36
  <!-- /wp:quote -->
33
37
 
34
38
  <!-- wp:columns -->
@@ -43,7 +47,9 @@ exports[`cpt locking template_lock all unlocked group should allow blocks to be
43
47
  <!-- /wp:paragraph -->
44
48
 
45
49
  <!-- wp:quote -->
46
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
50
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
51
+ <p></p>
52
+ <!-- /wp:paragraph --></blockquote>
47
53
  <!-- /wp:quote --></div>
48
54
  <!-- /wp:group -->"
49
55
  `;
@@ -51,7 +57,9 @@ exports[`cpt locking template_lock all unlocked group should allow blocks to be
51
57
  exports[`cpt locking template_lock all unlocked group should allow blocks to be removed 1`] = `
52
58
  "<!-- wp:group {\\"templateLock\\":false} -->
53
59
  <div class=\\"wp-block-group\\"><!-- wp:quote -->
54
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
60
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
61
+ <p></p>
62
+ <!-- /wp:paragraph --></blockquote>
55
63
  <!-- /wp:quote --></div>
56
64
  <!-- /wp:group -->"
57
65
  `;
@@ -66,7 +74,9 @@ exports[`cpt locking template_lock false should allow blocks to be inserted 1`]
66
74
  <!-- /wp:paragraph -->
67
75
 
68
76
  <!-- wp:quote -->
69
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
77
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
78
+ <p></p>
79
+ <!-- /wp:paragraph --></blockquote>
70
80
  <!-- /wp:quote -->
71
81
 
72
82
  <!-- wp:columns -->
@@ -88,7 +98,9 @@ exports[`cpt locking template_lock false should allow blocks to be moved 1`] = `
88
98
  <!-- /wp:image -->
89
99
 
90
100
  <!-- wp:quote -->
91
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
101
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
102
+ <p></p>
103
+ <!-- /wp:paragraph --></blockquote>
92
104
  <!-- /wp:quote -->
93
105
 
94
106
  <!-- wp:columns -->
@@ -102,7 +114,9 @@ exports[`cpt locking template_lock false should allow blocks to be removed 1`] =
102
114
  <!-- /wp:image -->
103
115
 
104
116
  <!-- wp:quote -->
105
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
117
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
118
+ <p></p>
119
+ <!-- /wp:paragraph --></blockquote>
106
120
  <!-- /wp:quote -->
107
121
 
108
122
  <!-- wp:columns -->
@@ -120,7 +134,9 @@ exports[`cpt locking template_lock insert should allow blocks to be moved 1`] =
120
134
  <!-- /wp:image -->
121
135
 
122
136
  <!-- wp:quote -->
123
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
137
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
138
+ <p></p>
139
+ <!-- /wp:paragraph --></blockquote>
124
140
  <!-- /wp:quote -->
125
141
 
126
142
  <!-- wp:columns -->
@@ -3,7 +3,9 @@
3
3
  exports[`RenderAppender prop of InnerBlocks Users can customize the appender and can still insert blocks using exposed components 1`] = `
4
4
  "<!-- wp:test/inner-blocks-render-appender -->
5
5
  <div style=\\"outline:1px solid gray;padding:5px\\" class=\\"wp-block-test-inner-blocks-render-appender\\"><!-- wp:quote -->
6
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
6
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
7
+ <p></p>
8
+ <!-- /wp:paragraph --></blockquote>
7
9
  <!-- /wp:quote --></div>
8
10
  <!-- /wp:test/inner-blocks-render-appender -->"
9
11
  `;
@@ -11,7 +13,9 @@ exports[`RenderAppender prop of InnerBlocks Users can customize the appender and
11
13
  exports[`RenderAppender prop of InnerBlocks Users can dynamically customize the appender 1`] = `
12
14
  "<!-- wp:test/inner-blocks-render-appender-dynamic -->
13
15
  <div style=\\"outline:1px solid gray;padding:5px\\" class=\\"wp-block-test-inner-blocks-render-appender-dynamic\\"><!-- wp:quote -->
14
- <blockquote class=\\"wp-block-quote\\"><p></p></blockquote>
16
+ <blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
17
+ <p></p>
18
+ <!-- /wp:paragraph --></blockquote>
15
19
  <!-- /wp:quote -->
16
20
 
17
21
  <!-- wp:video -->