@wordpress/e2e-tests 8.9.0 → 8.10.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 +2 -0
- package/package.json +9 -9
- package/plugins/block-bindings/index.js +0 -1
- package/plugins/block-template-registration.php +6 -6
- package/plugins/interactive-blocks/directive-class/render.php +16 -4
- package/plugins/interactive-blocks/directive-class/view.js +2 -2
- package/plugins/interactive-blocks/directive-init/view.js +1 -1
- package/plugins/interactive-blocks/directive-on-document/view.js +1 -1
- package/plugins/interactive-blocks/directive-on-window/view.js +1 -1
- package/plugins/interactive-blocks/directive-run/view.js +1 -3
- package/plugins/interactive-blocks/directive-watch/view.js +1 -1
- package/plugins/interactive-blocks/tovdom-islands/view.js +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wordpress/e2e-tests",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.10.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",
|
@@ -24,13 +24,13 @@
|
|
24
24
|
"npm": ">=8.19.2"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@wordpress/e2e-test-utils": "^11.
|
28
|
-
"@wordpress/interactivity": "^6.
|
29
|
-
"@wordpress/interactivity-router": "^2.
|
30
|
-
"@wordpress/jest-console": "^8.
|
31
|
-
"@wordpress/jest-puppeteer-axe": "^7.
|
32
|
-
"@wordpress/scripts": "^30.
|
33
|
-
"@wordpress/url": "^4.
|
27
|
+
"@wordpress/e2e-test-utils": "^11.10.0",
|
28
|
+
"@wordpress/interactivity": "^6.10.0",
|
29
|
+
"@wordpress/interactivity-router": "^2.10.0",
|
30
|
+
"@wordpress/jest-console": "^8.10.0",
|
31
|
+
"@wordpress/jest-puppeteer-axe": "^7.10.0",
|
32
|
+
"@wordpress/scripts": "^30.2.0",
|
33
|
+
"@wordpress/url": "^4.10.0",
|
34
34
|
"chalk": "^4.0.0",
|
35
35
|
"expect-puppeteer": "^4.4.0",
|
36
36
|
"filenamify": "^4.2.0",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"publishConfig": {
|
48
48
|
"access": "public"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
|
51
51
|
}
|
@@ -11,7 +11,7 @@ add_action(
|
|
11
11
|
'init',
|
12
12
|
function () {
|
13
13
|
// Custom template used by most tests.
|
14
|
-
|
14
|
+
register_block_template(
|
15
15
|
'gutenberg//plugin-template',
|
16
16
|
array(
|
17
17
|
'title' => 'Plugin Template',
|
@@ -28,7 +28,7 @@ add_action(
|
|
28
28
|
);
|
29
29
|
|
30
30
|
// Custom template overridden by the theme.
|
31
|
-
|
31
|
+
register_block_template(
|
32
32
|
'gutenberg//custom-template',
|
33
33
|
array(
|
34
34
|
'title' => 'Custom Template (overridden by the theme)',
|
@@ -39,7 +39,7 @@ add_action(
|
|
39
39
|
);
|
40
40
|
|
41
41
|
// Custom template used to test unregistration.
|
42
|
-
|
42
|
+
register_block_template(
|
43
43
|
'gutenberg//plugin-unregistered-template',
|
44
44
|
array(
|
45
45
|
'title' => 'Plugin Unregistered Template',
|
@@ -47,10 +47,10 @@ add_action(
|
|
47
47
|
'content' => '<!-- wp:template-part {"slug":"header","tagName":"header"} /--><!-- wp:group {"tagName":"main","layout":{"inherit":true}} --><main class="wp-block-group"><!-- wp:paragraph --><p>This is a plugin-registered template that is also unregistered.</p><!-- /wp:paragraph --></main><!-- /wp:group -->',
|
48
48
|
)
|
49
49
|
);
|
50
|
-
|
50
|
+
unregister_block_template( 'gutenberg//plugin-unregistered-template' );
|
51
51
|
|
52
52
|
// Custom template used to test overriding default WP templates.
|
53
|
-
|
53
|
+
register_block_template(
|
54
54
|
'gutenberg//page',
|
55
55
|
array(
|
56
56
|
'title' => 'Plugin Page Template',
|
@@ -60,7 +60,7 @@ add_action(
|
|
60
60
|
);
|
61
61
|
|
62
62
|
// Custom template used to test overriding default WP templates which can be created by the user.
|
63
|
-
|
63
|
+
register_block_template(
|
64
64
|
'gutenberg//author-admin',
|
65
65
|
array(
|
66
66
|
'title' => 'Plugin Author Template',
|
@@ -59,17 +59,17 @@
|
|
59
59
|
data-testid="can toggle class when class attribute is missing"
|
60
60
|
></div>
|
61
61
|
|
62
|
-
<div data-wp-context='{ "
|
62
|
+
<div data-wp-context='{ "value": false }'>
|
63
63
|
<div
|
64
64
|
class="foo"
|
65
|
-
data-wp-class--foo="context.
|
65
|
+
data-wp-class--foo="context.value"
|
66
66
|
data-testid="can use context values"
|
67
67
|
></div>
|
68
68
|
<button
|
69
|
-
data-wp-on--click="actions.
|
69
|
+
data-wp-on--click="actions.toggleContextValue"
|
70
70
|
data-testid="toggle context false value"
|
71
71
|
>
|
72
|
-
Toggle context
|
72
|
+
Toggle context value
|
73
73
|
</button>
|
74
74
|
</div>
|
75
75
|
|
@@ -83,4 +83,16 @@
|
|
83
83
|
data-testid="can use classes with several dashes"
|
84
84
|
></div>
|
85
85
|
|
86
|
+
<div data-wp-context='{ "value": false }'>
|
87
|
+
<div
|
88
|
+
data-wp-class--default="context.value"
|
89
|
+
data-testid="class name default"
|
90
|
+
></div>
|
91
|
+
<button
|
92
|
+
data-wp-on--click="actions.toggleContextValue"
|
93
|
+
data-testid="toggle class name default"
|
94
|
+
>
|
95
|
+
Toggle context val
|
96
|
+
</button>
|
97
|
+
</div>
|
86
98
|
</div>
|
@@ -15,9 +15,9 @@ const { state } = store( 'directive-class', {
|
|
15
15
|
toggleFalseValue: () => {
|
16
16
|
state.falseValue = ! state.falseValue;
|
17
17
|
},
|
18
|
-
|
18
|
+
toggleContextValue: () => {
|
19
19
|
const context = getContext();
|
20
|
-
context.
|
20
|
+
context.value = ! context.value;
|
21
21
|
},
|
22
22
|
},
|
23
23
|
} );
|
@@ -12,7 +12,7 @@ const { directive } = privateApis(
|
|
12
12
|
directive(
|
13
13
|
'show-mock',
|
14
14
|
( { directives: { 'show-mock': showMock }, element, evaluate } ) => {
|
15
|
-
const entry = showMock.find( ( { suffix } ) => suffix ===
|
15
|
+
const entry = showMock.find( ( { suffix } ) => suffix === null );
|
16
16
|
if ( ! evaluate( entry ) ) {
|
17
17
|
return null;
|
18
18
|
}
|
@@ -12,7 +12,7 @@ const { directive } = privateApis(
|
|
12
12
|
directive(
|
13
13
|
'show-mock',
|
14
14
|
( { directives: { 'show-mock': showMock }, element, evaluate } ) => {
|
15
|
-
const entry = showMock.find( ( { suffix } ) => suffix ===
|
15
|
+
const entry = showMock.find( ( { suffix } ) => suffix === null );
|
16
16
|
if ( ! evaluate( entry ) ) {
|
17
17
|
return null;
|
18
18
|
}
|
@@ -12,7 +12,7 @@ const { directive } = privateApis(
|
|
12
12
|
directive(
|
13
13
|
'show-mock',
|
14
14
|
( { directives: { 'show-mock': showMock }, element, evaluate } ) => {
|
15
|
-
const entry = showMock.find( ( { suffix } ) => suffix ===
|
15
|
+
const entry = showMock.find( ( { suffix } ) => suffix === null );
|
16
16
|
if ( ! evaluate( entry ) ) {
|
17
17
|
return null;
|
18
18
|
}
|
@@ -21,9 +21,7 @@ directive(
|
|
21
21
|
element,
|
22
22
|
evaluate,
|
23
23
|
} ) => {
|
24
|
-
const entry = showChildren.find(
|
25
|
-
( { suffix } ) => suffix === 'default'
|
26
|
-
);
|
24
|
+
const entry = showChildren.find( ( { suffix } ) => suffix === null );
|
27
25
|
return evaluate( entry )
|
28
26
|
? element
|
29
27
|
: cloneElement( element, { children: null } );
|
@@ -12,7 +12,7 @@ const { directive } = privateApis(
|
|
12
12
|
directive(
|
13
13
|
'show-mock',
|
14
14
|
( { directives: { 'show-mock': showMock }, element, evaluate } ) => {
|
15
|
-
const entry = showMock.find( ( { suffix } ) => suffix ===
|
15
|
+
const entry = showMock.find( ( { suffix } ) => suffix === null );
|
16
16
|
if ( ! evaluate( entry ) ) {
|
17
17
|
return null;
|
18
18
|
}
|
@@ -12,7 +12,7 @@ const { directive, h } = privateApis(
|
|
12
12
|
directive(
|
13
13
|
'show-mock',
|
14
14
|
( { directives: { 'show-mock': showMock }, element, evaluate } ) => {
|
15
|
-
const entry = showMock.find( ( { suffix } ) => suffix ===
|
15
|
+
const entry = showMock.find( ( { suffix } ) => suffix === null );
|
16
16
|
|
17
17
|
if ( ! evaluate( entry ) ) {
|
18
18
|
element.props.children = h(
|