@wordpress/e2e-tests 7.26.0 → 7.28.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/package.json +9 -9
- package/plugins/interactive-blocks/directive-each/view.js +3 -3
- package/plugins/interactive-blocks/directive-on/render.php +20 -0
- package/plugins/interactive-blocks/directive-on/view.js +12 -0
- package/plugins/interactive-blocks/directive-priorities/view.js +2 -2
- package/plugins/interactive-blocks/directive-watch/view.js +1 -1
- package/plugins/plugins-api/annotations-sidebar.js +2 -2
- package/plugins/plugins-api/document-setting.js +1 -1
- package/plugins/plugins-api/post-status-info.js +1 -1
- package/plugins/plugins-api/publish-panel.js +2 -2
- package/plugins/plugins-api/sidebar.js +2 -2
- package/plugins/plugins-api.php +5 -5
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/e2e-tests",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.28.0",
|
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,13 +23,13 @@
|
|
23
23
|
"node": ">=14"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@wordpress/e2e-test-utils": "^10.
|
27
|
-
"@wordpress/interactivity": "^5.
|
28
|
-
"@wordpress/interactivity-router": "^1.
|
29
|
-
"@wordpress/jest-console": "^7.
|
30
|
-
"@wordpress/jest-puppeteer-axe": "^6.
|
31
|
-
"@wordpress/scripts": "^27.
|
32
|
-
"@wordpress/url": "^3.
|
26
|
+
"@wordpress/e2e-test-utils": "^10.28.0",
|
27
|
+
"@wordpress/interactivity": "^5.6.0",
|
28
|
+
"@wordpress/interactivity-router": "^1.7.0",
|
29
|
+
"@wordpress/jest-console": "^7.28.0",
|
30
|
+
"@wordpress/jest-puppeteer-axe": "^6.28.0",
|
31
|
+
"@wordpress/scripts": "^27.8.0",
|
32
|
+
"@wordpress/url": "^3.58.0",
|
33
33
|
"chalk": "^4.0.0",
|
34
34
|
"expect-puppeteer": "^4.4.0",
|
35
35
|
"filenamify": "^4.2.0",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"publishConfig": {
|
47
47
|
"access": "public"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "581d8a5580dba8f600b7268d51eb554771ae482c"
|
50
50
|
}
|
@@ -147,9 +147,9 @@ store( 'directive-each', {
|
|
147
147
|
state
|
148
148
|
.animalBreeds
|
149
149
|
.forEach( ( { name, breeds } ) => {
|
150
|
-
if ( name === 'Dog') breeds.unshift( 'german shepherd' );
|
151
|
-
if ( name === 'Cat') breeds.unshift( 'maine coon' );
|
152
|
-
if ( name === 'Rat') breeds.unshift( 'satin' );
|
150
|
+
if ( name === 'Dog') {breeds.unshift( 'german shepherd' );}
|
151
|
+
if ( name === 'Cat') {breeds.unshift( 'maine coon' );}
|
152
|
+
if ( name === 'Rat') {breeds.unshift( 'satin' );}
|
153
153
|
} );
|
154
154
|
}
|
155
155
|
}
|
@@ -49,4 +49,24 @@
|
|
49
49
|
data-wp-on--click="actions.clickHandler"
|
50
50
|
>Click me!</button>
|
51
51
|
</div>
|
52
|
+
<div data-wp-context='{"clicked":false,"clickCount":0,"isOpen":true}'>
|
53
|
+
<p
|
54
|
+
data-wp-text="context.clicked"
|
55
|
+
data-testid="multiple handlers clicked"
|
56
|
+
>false</p>
|
57
|
+
<p
|
58
|
+
data-wp-text="context.clickCount"
|
59
|
+
data-testid="multiple handlers clickCount"
|
60
|
+
>0</p>
|
61
|
+
<p
|
62
|
+
data-wp-text="context.isOpen"
|
63
|
+
data-testid="multiple handlers isOpen"
|
64
|
+
>true</p>
|
65
|
+
<button
|
66
|
+
data-testid="multiple handlers button"
|
67
|
+
data-wp-on--click="actions.setClicked"
|
68
|
+
data-wp-on--click--counter="actions.countClick"
|
69
|
+
data-wp-on--click--toggle="actions.toggle"
|
70
|
+
>Click me!</button>
|
71
|
+
</div>
|
52
72
|
</div>
|
@@ -26,5 +26,17 @@ const { state } = store( 'directive-on', {
|
|
26
26
|
const context = getContext();
|
27
27
|
context.customEvents += 1;
|
28
28
|
},
|
29
|
+
setClicked: () => {
|
30
|
+
const context = getContext();
|
31
|
+
context.clicked = true;
|
32
|
+
},
|
33
|
+
countClick: () => {
|
34
|
+
const context = getContext();
|
35
|
+
context.clickCount += 1;
|
36
|
+
},
|
37
|
+
toggle: () => {
|
38
|
+
const context = getContext();
|
39
|
+
context.isOpen = ! context.isOpen;
|
40
|
+
},
|
29
41
|
},
|
30
42
|
} );
|
@@ -24,8 +24,8 @@ const namespace = 'directive-priorities';
|
|
24
24
|
*/
|
25
25
|
const executionProof = ( n ) => {
|
26
26
|
const el = document.querySelector( '[data-testid="execution order"]' );
|
27
|
-
if ( ! el.textContent ) el.textContent = n;
|
28
|
-
else el.textContent += `, ${ n }`;
|
27
|
+
if ( ! el.textContent ) {el.textContent = n;}
|
28
|
+
else {el.textContent += `, ${ n }`;}
|
29
29
|
};
|
30
30
|
|
31
31
|
/**
|
@@ -13,7 +13,7 @@ directive(
|
|
13
13
|
'show-mock',
|
14
14
|
( { directives: { 'show-mock': showMock }, element, evaluate } ) => {
|
15
15
|
const entry = showMock.find( ( { suffix } ) => suffix === 'default' );
|
16
|
-
if ( ! evaluate( entry ) ) return null;
|
16
|
+
if ( ! evaluate( entry ) ) {return null;}
|
17
17
|
return element;
|
18
18
|
}
|
19
19
|
);
|
@@ -8,8 +8,8 @@
|
|
8
8
|
const Component = wp.element.Component;
|
9
9
|
const __ = wp.i18n.__;
|
10
10
|
const registerPlugin = wp.plugins.registerPlugin;
|
11
|
-
const PluginSidebar = wp.
|
12
|
-
const PluginSidebarMoreMenuItem = wp.
|
11
|
+
const PluginSidebar = wp.editor.PluginSidebar;
|
12
|
+
const PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;
|
13
13
|
|
14
14
|
class SidebarContents extends Component {
|
15
15
|
constructor( props ) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
const el = wp.element.createElement;
|
3
3
|
const __ = wp.i18n.__;
|
4
4
|
const registerPlugin = wp.plugins.registerPlugin;
|
5
|
-
const PluginDocumentSettingPanel = wp.
|
5
|
+
const PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;
|
6
6
|
|
7
7
|
function MyDocumentSettingPlugin() {
|
8
8
|
return el(
|
@@ -2,7 +2,7 @@
|
|
2
2
|
const el = wp.element.createElement;
|
3
3
|
const __ = wp.i18n.__;
|
4
4
|
const registerPlugin = wp.plugins.registerPlugin;
|
5
|
-
const PluginPostStatusInfo = wp.
|
5
|
+
const PluginPostStatusInfo = wp.editor.PluginPostStatusInfo;
|
6
6
|
|
7
7
|
function MyPostStatusInfoPlugin() {
|
8
8
|
return el(
|
@@ -3,8 +3,8 @@
|
|
3
3
|
const Fragment = wp.element.Fragment;
|
4
4
|
const __ = wp.i18n.__;
|
5
5
|
const registerPlugin = wp.plugins.registerPlugin;
|
6
|
-
const PluginPostPublishPanel = wp.
|
7
|
-
const PluginPrePublishPanel = wp.
|
6
|
+
const PluginPostPublishPanel = wp.editor.PluginPostPublishPanel;
|
7
|
+
const PluginPrePublishPanel = wp.editor.PluginPrePublishPanel;
|
8
8
|
|
9
9
|
function PanelContent() {
|
10
10
|
return el( 'p', {}, __( 'Here is the panel content!' ) );
|
@@ -10,8 +10,8 @@
|
|
10
10
|
const el = wp.element.createElement;
|
11
11
|
const __ = wp.i18n.__;
|
12
12
|
const registerPlugin = wp.plugins.registerPlugin;
|
13
|
-
const PluginSidebar = wp.
|
14
|
-
const PluginSidebarMoreMenuItem = wp.
|
13
|
+
const PluginSidebar = wp.editor.PluginSidebar;
|
14
|
+
const PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;
|
15
15
|
|
16
16
|
function SidebarContents() {
|
17
17
|
const postTitle = useSelect( ( select ) =>
|
package/plugins/plugins-api.php
CHANGED
@@ -15,7 +15,7 @@ function enqueue_plugins_api_plugin_scripts() {
|
|
15
15
|
'gutenberg-test-plugins-api-post-status-info',
|
16
16
|
plugins_url( 'plugins-api/post-status-info.js', __FILE__ ),
|
17
17
|
array(
|
18
|
-
'wp-
|
18
|
+
'wp-editor',
|
19
19
|
'wp-element',
|
20
20
|
'wp-i18n',
|
21
21
|
'wp-plugins',
|
@@ -28,7 +28,7 @@ function enqueue_plugins_api_plugin_scripts() {
|
|
28
28
|
'gutenberg-test-plugins-api-publish-pane;',
|
29
29
|
plugins_url( 'plugins-api/publish-panel.js', __FILE__ ),
|
30
30
|
array(
|
31
|
-
'wp-
|
31
|
+
'wp-editor',
|
32
32
|
'wp-element',
|
33
33
|
'wp-i18n',
|
34
34
|
'wp-plugins',
|
@@ -44,7 +44,7 @@ function enqueue_plugins_api_plugin_scripts() {
|
|
44
44
|
'wp-components',
|
45
45
|
'wp-compose',
|
46
46
|
'wp-data',
|
47
|
-
'wp-
|
47
|
+
'wp-editor',
|
48
48
|
'wp-block-editor',
|
49
49
|
'wp-editor',
|
50
50
|
'wp-element',
|
@@ -63,7 +63,7 @@ function enqueue_plugins_api_plugin_scripts() {
|
|
63
63
|
'wp-components',
|
64
64
|
'wp-compose',
|
65
65
|
'wp-data',
|
66
|
-
'wp-
|
66
|
+
'wp-editor',
|
67
67
|
'wp-block-editor',
|
68
68
|
'wp-element',
|
69
69
|
'wp-i18n',
|
@@ -78,7 +78,7 @@ function enqueue_plugins_api_plugin_scripts() {
|
|
78
78
|
'gutenberg-test-plugins-api-document-setting',
|
79
79
|
plugins_url( 'plugins-api/document-setting.js', __FILE__ ),
|
80
80
|
array(
|
81
|
-
'wp-
|
81
|
+
'wp-editor',
|
82
82
|
'wp-element',
|
83
83
|
'wp-i18n',
|
84
84
|
'wp-plugins',
|