@wordpress/e2e-tests 9.20.1-next.v.202609171837.0 → 9.22.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mu-plugins/e2e-fast-sync-polling.php +4 -4
  3. package/package.json +5 -7
  4. package/plugins/block-bindings.php +5 -0
  5. package/plugins/interactive-blocks/directive-context/render.php +1 -1
  6. package/plugins/interactive-blocks/directive-html/block.json +15 -0
  7. package/plugins/interactive-blocks/directive-html/render.php +42 -0
  8. package/plugins/interactive-blocks/directive-html/view.asset.php +1 -0
  9. package/plugins/interactive-blocks/directive-html/view.js +20 -0
  10. package/plugins/interactive-blocks/directive-init/render.php +1 -1
  11. package/plugins/interactive-blocks/directive-on/render.php +1 -1
  12. package/plugins/interactive-blocks/directive-on-document/render.php +1 -1
  13. package/plugins/interactive-blocks/directive-on-window/render.php +1 -1
  14. package/plugins/interactive-blocks/directive-run/render.php +1 -1
  15. package/plugins/interactive-blocks/directive-run/view.js +2 -2
  16. package/plugins/interactive-blocks/directive-watch/render.php +1 -1
  17. package/plugins/interactive-blocks/router-navigation-full-page/block.json +15 -0
  18. package/plugins/interactive-blocks/router-navigation-full-page/render.php +120 -0
  19. package/plugins/interactive-blocks/router-navigation-full-page/view.asset.php +9 -0
  20. package/plugins/interactive-blocks/router-navigation-full-page/view.js +95 -0
  21. package/plugins/interactive-blocks/router-navigation-lifecycle/block.json +15 -0
  22. package/plugins/interactive-blocks/router-navigation-lifecycle/render.php +303 -0
  23. package/plugins/interactive-blocks/router-navigation-lifecycle/view.asset.php +9 -0
  24. package/plugins/interactive-blocks/router-navigation-lifecycle/view.js +383 -0
  25. package/plugins/interactive-blocks/tovdom-islands/render.php +7 -10
  26. package/plugins/interactive-blocks/with-scope/render.php +1 -1
  27. package/plugins/lightbox-overlay-wrapper.php +25 -0
  28. package/plugins/media-upload-filter/index.js +30 -0
  29. package/plugins/media-upload-filter.php +23 -0
@@ -32,11 +32,9 @@
32
32
  <div data-wp-interactive="tovdom-islands">
33
33
  <div data-wp-ignore>
34
34
  <div data-wp-show-mock="state.falseValue">
35
- <span
36
- data-testid="inside an inner block of an isolated island"
37
- >
38
- This should be shown because it is inside an inner
39
- block of an isolated island.
35
+ <span data-testid="inside an element with data-wp-ignore">
36
+ This should not be shown because data-wp-ignore no
37
+ longer prevents hydration.
40
38
  </span>
41
39
  </div>
42
40
  </div>
@@ -60,15 +58,14 @@
60
58
  <div>
61
59
  <div
62
60
  data-wp-interactive="tovdom-islands"
63
- data-wp-ignore
64
61
  >
65
62
  <div data-wp-show-mock="state.falseValue">
66
63
  <span
67
- data-testid="island inside inner block of isolated island"
64
+ data-testid="island inside an inner element of another island"
68
65
  >
69
- This should not be shown because even though it
70
- is inside an inner block of an isolated island,
71
- it's inside an new island.
66
+ This should not be shown because it is inside a
67
+ new island nested in an inner element of another
68
+ island.
72
69
  </span>
73
70
  </div>
74
71
  </div>
@@ -6,7 +6,7 @@
6
6
  */
7
7
  ?>
8
8
 
9
- <div data-wp-interactive="with-scope" data-wp-context='{"asyncCounter": 0, "syncCounter": 0}' data-wp-init--a='callbacks.asyncInit' data-wp-init--b='callbacks.syncInit'>
9
+ <div data-wp-interactive="with-scope" data-wp-context='{"asyncCounter": 0, "syncCounter": 0}' data-wp-init---a='callbacks.asyncInit' data-wp-init---b='callbacks.syncInit'>
10
10
  <p data-wp-text="context.asyncCounter" data-testid="asyncCounter">0</p>
11
11
  <p data-wp-text="context.syncCounter" data-testid="syncCounter">0</p>
12
12
  </div>
@@ -0,0 +1,25 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Lightbox Overlay Wrapper
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-lightbox-overlay-wrapper
8
+ */
9
+
10
+ /**
11
+ * Opens a wrapper around the page, so the lightbox overlay printed on
12
+ * `wp_footer` is not a direct child of `<body>`.
13
+ */
14
+ function gutenberg_test_lightbox_overlay_wrapper_open() {
15
+ echo '<div id="site-wrap">';
16
+ }
17
+ add_action( 'wp_body_open', 'gutenberg_test_lightbox_overlay_wrapper_open' );
18
+
19
+ /**
20
+ * Closes the wrapper after the lightbox overlay has been printed.
21
+ */
22
+ function gutenberg_test_lightbox_overlay_wrapper_close() {
23
+ echo '</div>';
24
+ }
25
+ add_action( 'wp_footer', 'gutenberg_test_lightbox_overlay_wrapper_close', 100 );
@@ -0,0 +1,30 @@
1
+ ( function () {
2
+ const el = wp.element.createElement;
3
+ const Fragment = wp.element.Fragment;
4
+
5
+ // Wraps the media picker with a marker exposing the prop plugins use to
6
+ // recognize the featured image.
7
+ wp.hooks.addFilter(
8
+ 'editor.MediaUpload',
9
+ 'gutenberg-test/media-upload-filter',
10
+ function ( MediaUpload ) {
11
+ return function ( props ) {
12
+ return el(
13
+ Fragment,
14
+ {},
15
+ el( MediaUpload, props ),
16
+ el(
17
+ 'div',
18
+ {
19
+ className: 'e2e-media-upload-filter',
20
+ 'data-featured-image-flow': String(
21
+ !! props.featuredImageFlow
22
+ ),
23
+ },
24
+ 'Media upload filter'
25
+ )
26
+ );
27
+ };
28
+ }
29
+ );
30
+ } )();
@@ -0,0 +1,23 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Media Upload Filter
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-media-upload-filter
8
+ */
9
+
10
+ /**
11
+ * Enqueues a script extending the media picker through `editor.MediaUpload`.
12
+ */
13
+ function enqueue_media_upload_filter_plugin_script() {
14
+ wp_enqueue_script(
15
+ 'gutenberg-test-media-upload-filter',
16
+ plugins_url( 'media-upload-filter/index.js', __FILE__ ),
17
+ array( 'wp-element', 'wp-hooks', 'wp-editor' ),
18
+ filemtime( plugin_dir_path( __FILE__ ) . 'media-upload-filter/index.js' ),
19
+ true
20
+ );
21
+ }
22
+
23
+ add_action( 'enqueue_block_editor_assets', 'enqueue_media_upload_filter_plugin_script' );