@wordpress/e2e-tests 7.6.4 → 7.6.6
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 +3 -3
- package/plugins/iframed-enqueue-block-assets/script.js +3 -0
- package/plugins/iframed-enqueue-block-assets.php +13 -0
- package/specs/editor/plugins/iframed-equeue-block-assets.test.js +7 -0
- package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +1 -1
- package/specs/editor/various/reusable-blocks.test.js +3 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/e2e-tests",
|
3
|
-
"version": "7.6.
|
3
|
+
"version": "7.6.6",
|
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,7 +23,7 @@
|
|
23
23
|
"node": ">=14"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@wordpress/e2e-test-utils": "^10.6.
|
26
|
+
"@wordpress/e2e-test-utils": "^10.6.3",
|
27
27
|
"@wordpress/jest-console": "^7.6.1",
|
28
28
|
"@wordpress/jest-puppeteer-axe": "^6.6.1",
|
29
29
|
"@wordpress/scripts": "^26.6.2",
|
@@ -45,5 +45,5 @@
|
|
45
45
|
"publishConfig": {
|
46
46
|
"access": "public"
|
47
47
|
},
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "86ecd96b3bcada6b4cc35bb2455b3029cebb0ff3"
|
49
49
|
}
|
@@ -17,5 +17,18 @@ add_action(
|
|
17
17
|
filemtime( plugin_dir_path( __FILE__ ) . 'iframed-enqueue-block-assets/style.css' )
|
18
18
|
);
|
19
19
|
wp_add_inline_style( 'iframed-enqueue-block-assets', 'body{padding:20px!important}' );
|
20
|
+
wp_enqueue_script(
|
21
|
+
'iframed-enqueue-block-assets-script',
|
22
|
+
plugin_dir_url( __FILE__ ) . 'iframed-enqueue-block-assets/script.js',
|
23
|
+
array(),
|
24
|
+
filemtime( plugin_dir_path( __FILE__ ) . 'iframed-enqueue-block-assets/script.js' )
|
25
|
+
);
|
26
|
+
wp_localize_script(
|
27
|
+
'iframed-enqueue-block-assets-script',
|
28
|
+
'iframedEnqueueBlockAssetsL10n',
|
29
|
+
array(
|
30
|
+
'test' => 'Iframed Enqueue Block Assets!',
|
31
|
+
)
|
32
|
+
);
|
20
33
|
}
|
21
34
|
);
|
@@ -32,6 +32,7 @@ describe( 'iframed inline styles', () => {
|
|
32
32
|
} );
|
33
33
|
|
34
34
|
it( 'should load styles added through enqueue_block_assets', async () => {
|
35
|
+
await page.waitForSelector( 'iframe[name="editor-canvas"]' );
|
35
36
|
// Check stylesheet.
|
36
37
|
expect(
|
37
38
|
await getComputedStyle( canvas(), 'body', 'background-color' )
|
@@ -40,5 +41,11 @@ describe( 'iframed inline styles', () => {
|
|
40
41
|
expect( await getComputedStyle( canvas(), 'body', 'padding' ) ).toBe(
|
41
42
|
'20px'
|
42
43
|
);
|
44
|
+
|
45
|
+
expect(
|
46
|
+
await canvas().evaluate( () => ( { ...document.body.dataset } ) )
|
47
|
+
).toEqual( {
|
48
|
+
iframedEnqueueBlockAssetsL10n: 'Iframed Enqueue Block Assets!',
|
49
|
+
} );
|
43
50
|
} );
|
44
51
|
} );
|
@@ -90,7 +90,7 @@ describe( 'block editor keyboard shortcuts', () => {
|
|
90
90
|
} );
|
91
91
|
it( 'should prevent deleting multiple selected blocks from inputs', async () => {
|
92
92
|
await clickBlockToolbarButton( 'Options' );
|
93
|
-
await clickMenuItem( 'Create pattern' );
|
93
|
+
await clickMenuItem( 'Create pattern/reusable block' );
|
94
94
|
const reusableBlockNameInputSelector =
|
95
95
|
'.reusable-blocks-menu-items__convert-modal .components-text-control__input';
|
96
96
|
const nameInput = await page.waitForSelector(
|
@@ -197,7 +197,7 @@ describe( 'Reusable blocks', () => {
|
|
197
197
|
|
198
198
|
// Convert block to a reusable block.
|
199
199
|
await clickBlockToolbarButton( 'Options' );
|
200
|
-
await clickMenuItem( 'Create pattern' );
|
200
|
+
await clickMenuItem( 'Create pattern/reusable block' );
|
201
201
|
|
202
202
|
// Set title.
|
203
203
|
const nameInput = await page.waitForSelector(
|
@@ -212,7 +212,7 @@ describe( 'Reusable blocks', () => {
|
|
212
212
|
|
213
213
|
// Wait for creation to finish.
|
214
214
|
await page.waitForXPath(
|
215
|
-
'//*[contains(@class, "components-snackbar")]/*[text()
|
215
|
+
'//*[contains(@class, "components-snackbar")]/*[contains(text(),"Pattern created:")]'
|
216
216
|
);
|
217
217
|
|
218
218
|
await clearAllBlocks();
|
@@ -383,7 +383,7 @@ describe( 'Reusable blocks', () => {
|
|
383
383
|
|
384
384
|
// Convert to reusable.
|
385
385
|
await clickBlockToolbarButton( 'Options' );
|
386
|
-
await clickMenuItem( 'Create pattern' );
|
386
|
+
await clickMenuItem( 'Create pattern/reusable block' );
|
387
387
|
const nameInput = await page.waitForSelector(
|
388
388
|
reusableBlockNameInputSelector
|
389
389
|
);
|