@wordpress/e2e-tests 4.0.0 → 4.0.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.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/e2e-tests",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.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",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"publishConfig": {
|
47
47
|
"access": "public"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "9c15c669843d53c5ca6024a4c486d01d819d123f"
|
50
50
|
}
|
@@ -33,9 +33,14 @@ describe( 'Query block', () => {
|
|
33
33
|
describe( 'Query block insertion', () => {
|
34
34
|
it( 'Carousel', async () => {
|
35
35
|
await insertBlock( 'Query' );
|
36
|
+
// Wait for the choose pattern button
|
37
|
+
const choosePatternButton = await page.waitForSelector(
|
38
|
+
'div[data-type="core/query"] button.is-primary'
|
39
|
+
);
|
40
|
+
await choosePatternButton.click();
|
36
41
|
// Wait for pattern blocks to be loaded.
|
37
42
|
await page.waitForSelector(
|
38
|
-
'.block-editor-block-pattern-setup__container
|
43
|
+
'.block-editor-block-pattern-setup__container iframe[title="Editor canvas"]'
|
39
44
|
);
|
40
45
|
/**
|
41
46
|
* Ensure that carousel is working by checking slider css classes
|
@@ -70,6 +75,11 @@ describe( 'Query block', () => {
|
|
70
75
|
} );
|
71
76
|
it( 'Grid view', async () => {
|
72
77
|
await insertBlock( 'Query' );
|
78
|
+
// Wait for the choose pattern button
|
79
|
+
const choosePatternButton = await page.waitForSelector(
|
80
|
+
'div[data-type="core/query"] button.is-primary'
|
81
|
+
);
|
82
|
+
await choosePatternButton.click();
|
73
83
|
// Wait for patterns setup to be loaded.
|
74
84
|
await page.waitForSelector(
|
75
85
|
'.block-editor-block-pattern-setup__display-controls'
|
@@ -80,8 +90,8 @@ describe( 'Query block', () => {
|
|
80
90
|
);
|
81
91
|
await gridViewButton.click();
|
82
92
|
// Wait for patterns to be loaded and click the wanted pattern.
|
83
|
-
const gridPattern = await page.
|
84
|
-
'
|
93
|
+
const gridPattern = await page.waitForSelector(
|
94
|
+
'.block-editor-block-pattern-setup-list__list-item[aria-label="Query Test 2"]'
|
85
95
|
);
|
86
96
|
await gridPattern.click();
|
87
97
|
// Wait for pattern setup to go away.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* WordPress dependencies
|
3
|
+
*/
|
4
|
+
import {
|
5
|
+
deleteAllTemplates,
|
6
|
+
activateTheme,
|
7
|
+
visitSiteEditor,
|
8
|
+
toggleGlobalStyles,
|
9
|
+
openGlobalStylesPanel,
|
10
|
+
} from '@wordpress/e2e-test-utils';
|
11
|
+
|
12
|
+
describe( 'Global styles sidebar', () => {
|
13
|
+
beforeAll( async () => {
|
14
|
+
await activateTheme( 'emptytheme' );
|
15
|
+
await Promise.all( [
|
16
|
+
deleteAllTemplates( 'wp_template' ),
|
17
|
+
deleteAllTemplates( 'wp_template_part' ),
|
18
|
+
] );
|
19
|
+
} );
|
20
|
+
afterAll( async () => {
|
21
|
+
await Promise.all( [
|
22
|
+
deleteAllTemplates( 'wp_template' ),
|
23
|
+
deleteAllTemplates( 'wp_template_part' ),
|
24
|
+
] );
|
25
|
+
await activateTheme( 'twentytwentyone' );
|
26
|
+
} );
|
27
|
+
beforeEach( async () => {
|
28
|
+
await visitSiteEditor();
|
29
|
+
} );
|
30
|
+
describe( 'blocks list', () => {
|
31
|
+
it( 'should filter results properly', async () => {
|
32
|
+
await toggleGlobalStyles();
|
33
|
+
await openGlobalStylesPanel( 'Blocks' );
|
34
|
+
await page.focus( '.edit-site-block-types-search input' );
|
35
|
+
await page.keyboard.type( 'heading' );
|
36
|
+
const results = await page.$$(
|
37
|
+
'.edit-site-block-types-item-list div[role="listitem"]'
|
38
|
+
);
|
39
|
+
expect( results.length ).toEqual( 1 );
|
40
|
+
} );
|
41
|
+
} );
|
42
|
+
} );
|