@wordpress/e2e-tests 9.4.1-next.v.202602091733.0 → 9.5.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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/e2e-tests",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"description": "Test plugins and mu-plugins for E2E tests in WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"npm": ">=8.19.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@wordpress/interactivity": "^6.
|
|
28
|
-
"@wordpress/interactivity-router": "^2.
|
|
27
|
+
"@wordpress/interactivity": "^6.40.0",
|
|
28
|
+
"@wordpress/interactivity-router": "^2.40.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"jest": ">=29",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "376124aa10dbc2cc0c81c964ec00b99fcfee5382"
|
|
40
40
|
}
|
|
@@ -74,6 +74,15 @@ $wrapper_attributes = get_block_wrapper_attributes();
|
|
|
74
74
|
<?php echo $label; ?>
|
|
75
75
|
</a>
|
|
76
76
|
<?php endforeach; ?>
|
|
77
|
+
<?php foreach ( $attributes['links'] as $label => $link ) : ?>
|
|
78
|
+
<a
|
|
79
|
+
data-testid="force link <?php echo $label; ?>"
|
|
80
|
+
data-wp-on--click="actions.navigateForce"
|
|
81
|
+
href="<?php echo $link; ?>"
|
|
82
|
+
>
|
|
83
|
+
<?php echo $label; ?> (force)
|
|
84
|
+
</a>
|
|
85
|
+
<?php endforeach; ?>
|
|
77
86
|
</nav>
|
|
78
87
|
|
|
79
88
|
<!-- HTML updated on navigation. -->
|
|
@@ -19,6 +19,15 @@ const { state } = store( 'test/router-styles', {
|
|
|
19
19
|
yield actions.navigate( e.target.href );
|
|
20
20
|
state.clientSideNavigation = true;
|
|
21
21
|
} ),
|
|
22
|
+
navigateForce: withSyncEvent( function* ( e ) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
state.clientSideNavigation = false;
|
|
25
|
+
const { actions } = yield import(
|
|
26
|
+
'@wordpress/interactivity-router'
|
|
27
|
+
);
|
|
28
|
+
yield actions.navigate( e.target.href, { force: true } );
|
|
29
|
+
state.clientSideNavigation = true;
|
|
30
|
+
} ),
|
|
22
31
|
*prefetch() {
|
|
23
32
|
state.prefetching = true;
|
|
24
33
|
const { ref } = getElement();
|
|
@@ -44,7 +44,7 @@ add_action(
|
|
|
44
44
|
)
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
-
// PHP-only block with
|
|
47
|
+
// PHP-only block with autoRegister flag, will be auto-registered without JS code
|
|
48
48
|
register_block_type(
|
|
49
49
|
'test/auto-register-block',
|
|
50
50
|
array(
|
|
@@ -67,8 +67,8 @@ add_action(
|
|
|
67
67
|
);
|
|
68
68
|
},
|
|
69
69
|
'supports' => array(
|
|
70
|
-
'
|
|
71
|
-
'color'
|
|
70
|
+
'autoRegister' => true,
|
|
71
|
+
'color' => array(
|
|
72
72
|
'background' => true,
|
|
73
73
|
'text' => false,
|
|
74
74
|
),
|
|
@@ -76,7 +76,7 @@ add_action(
|
|
|
76
76
|
)
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
-
// PHP-only block WITHOUT
|
|
79
|
+
// PHP-only block WITHOUT autoRegister flag, will NOT be auto-registered without JS code
|
|
80
80
|
register_block_type(
|
|
81
81
|
'test/php-only-no-auto-register',
|
|
82
82
|
array(
|
|
@@ -162,7 +162,7 @@ add_action(
|
|
|
162
162
|
);
|
|
163
163
|
},
|
|
164
164
|
'supports' => array(
|
|
165
|
-
'
|
|
165
|
+
'autoRegister' => true,
|
|
166
166
|
),
|
|
167
167
|
)
|
|
168
168
|
);
|