@wordpress/e2e-tests 5.1.1 → 5.1.3
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/e2e-tests",
|
3
|
-
"version": "5.1.
|
3
|
+
"version": "5.1.3",
|
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": ">=14"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@wordpress/e2e-test-utils": "^8.1.
|
27
|
-
"@wordpress/jest-console": "^6.0.
|
28
|
-
"@wordpress/jest-puppeteer-axe": "^5.0.
|
29
|
-
"@wordpress/scripts": "^24.1.
|
30
|
-
"@wordpress/url": "^3.18.
|
26
|
+
"@wordpress/e2e-test-utils": "^8.1.1",
|
27
|
+
"@wordpress/jest-console": "^6.0.1",
|
28
|
+
"@wordpress/jest-puppeteer-axe": "^5.0.1",
|
29
|
+
"@wordpress/scripts": "^24.1.2",
|
30
|
+
"@wordpress/url": "^3.18.1",
|
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": "
|
49
|
+
"gitHead": "54a676dba557a76062d3bf91bfe8a3e3ea12d254"
|
50
50
|
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/**
|
2
|
+
* WordPress dependencies
|
3
|
+
*/
|
4
|
+
import {
|
5
|
+
clickBlockAppender,
|
6
|
+
getEditedPostContent,
|
7
|
+
createNewPost,
|
8
|
+
transformBlockTo,
|
9
|
+
} from '@wordpress/e2e-test-utils';
|
10
|
+
|
11
|
+
describe( 'Quote', () => {
|
12
|
+
beforeEach( async () => {
|
13
|
+
await createNewPost();
|
14
|
+
} );
|
15
|
+
|
16
|
+
it( 'can be created by converting a quote and converted back to quote', async () => {
|
17
|
+
await clickBlockAppender();
|
18
|
+
await page.keyboard.type( 'test' );
|
19
|
+
await transformBlockTo( 'Quote' );
|
20
|
+
|
21
|
+
expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
|
22
|
+
"<!-- wp:quote -->
|
23
|
+
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
24
|
+
<p>test</p>
|
25
|
+
<!-- /wp:paragraph --></blockquote>
|
26
|
+
<!-- /wp:quote -->"
|
27
|
+
` );
|
28
|
+
|
29
|
+
await transformBlockTo( 'Pullquote' );
|
30
|
+
|
31
|
+
expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
|
32
|
+
"<!-- wp:pullquote -->
|
33
|
+
<figure class=\\"wp-block-pullquote\\"><blockquote><p>test</p></blockquote></figure>
|
34
|
+
<!-- /wp:pullquote -->"
|
35
|
+
` );
|
36
|
+
|
37
|
+
await transformBlockTo( 'Quote' );
|
38
|
+
|
39
|
+
expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
|
40
|
+
"<!-- wp:quote -->
|
41
|
+
<blockquote class=\\"wp-block-quote\\"><!-- wp:paragraph -->
|
42
|
+
<p>test</p>
|
43
|
+
<!-- /wp:paragraph --></blockquote>
|
44
|
+
<!-- /wp:quote -->"
|
45
|
+
` );
|
46
|
+
} );
|
47
|
+
} );
|