@wordpress/e2e-tests 9.17.0 → 9.18.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 (44) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/package.json +4 -4
  3. package/plugins/block-context/index.js +3 -2
  4. package/plugins/block-icons/index.js +5 -40
  5. package/plugins/custom-post-types.php +28 -0
  6. package/plugins/disable-post-revisions.php +10 -0
  7. package/plugins/inner-blocks-locking-all-embed/index.js +1 -1
  8. package/plugins/inner-blocks-templates/index.js +20 -15
  9. package/plugins/interactive-blocks/deferred-store/view.js +0 -3
  10. package/plugins/interactive-blocks/directive-bind/view.js +0 -3
  11. package/plugins/interactive-blocks/directive-class/view.js +0 -3
  12. package/plugins/interactive-blocks/directive-context/view.js +0 -3
  13. package/plugins/interactive-blocks/directive-each/view.js +0 -3
  14. package/plugins/interactive-blocks/directive-init/view.js +0 -3
  15. package/plugins/interactive-blocks/directive-key/view.js +0 -3
  16. package/plugins/interactive-blocks/directive-on/view.js +0 -3
  17. package/plugins/interactive-blocks/directive-on-document/view.js +0 -3
  18. package/plugins/interactive-blocks/directive-on-window/view.js +0 -3
  19. package/plugins/interactive-blocks/directive-priorities/view.js +0 -3
  20. package/plugins/interactive-blocks/directive-run/view.js +0 -3
  21. package/plugins/interactive-blocks/directive-style/view.js +0 -3
  22. package/plugins/interactive-blocks/directive-text/view.js +0 -3
  23. package/plugins/interactive-blocks/directive-watch/view.js +0 -3
  24. package/plugins/interactive-blocks/generator-scope/view.js +0 -3
  25. package/plugins/interactive-blocks/get-server-context/view.js +0 -3
  26. package/plugins/interactive-blocks/get-server-state/view.js +0 -3
  27. package/plugins/interactive-blocks/hydration-timing/view.js +0 -3
  28. package/plugins/interactive-blocks/hydration-timing-slow/view.js +0 -3
  29. package/plugins/interactive-blocks/namespace/view.js +0 -3
  30. package/plugins/interactive-blocks/negation-operator/view.js +0 -3
  31. package/plugins/interactive-blocks/router-navigate/view.js +0 -3
  32. package/plugins/interactive-blocks/router-race-condition/view.js +0 -3
  33. package/plugins/interactive-blocks/router-regions/view.js +0 -3
  34. package/plugins/interactive-blocks/router-script-modules-alpha/view.js +0 -7
  35. package/plugins/interactive-blocks/router-script-modules-bravo/view.js +0 -7
  36. package/plugins/interactive-blocks/router-script-modules-charlie/view.js +0 -7
  37. package/plugins/interactive-blocks/router-script-modules-wrapper/view.js +0 -3
  38. package/plugins/interactive-blocks/router-styles-wrapper/view.js +0 -3
  39. package/plugins/interactive-blocks/store/view.js +0 -3
  40. package/plugins/interactive-blocks/store-tag/view.js +0 -3
  41. package/plugins/interactive-blocks/tovdom/view.js +0 -3
  42. package/plugins/interactive-blocks/tovdom-islands/view.js +0 -3
  43. package/plugins/interactive-blocks/with-scope/view.js +0 -3
  44. package/plugins/view-config-extensibility.php +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 9.18.0 (2026-08-12)
6
+
7
+
5
8
  ## 9.17.0 (2026-07-29)
6
9
 
7
10
  ## 9.16.0 (2026-07-14)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "9.17.0",
3
+ "version": "9.18.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.52.0",
28
- "@wordpress/interactivity-router": "^2.52.0"
27
+ "@wordpress/interactivity": "^6.53.0",
28
+ "@wordpress/interactivity-router": "^2.53.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "y-websocket": "^3.0.0"
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "7e8b17a983f9391d3ebc7717af2a1c9ed7efc7ab"
41
+ "gitHead": "989764d42ff93e33684aaf0b96a5b7f3d9bbff52"
42
42
  }
@@ -18,12 +18,13 @@
18
18
 
19
19
  category: 'text',
20
20
 
21
+ template: [ [ 'gutenberg/test-context-consumer', {} ] ],
22
+ templateInsertUpdatesSelection: true,
23
+
21
24
  edit: function Edit( { attributes, setAttributes } ) {
22
25
  const blockProps = useBlockProps();
23
26
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
24
- template: [ [ 'gutenberg/test-context-consumer', {} ] ],
25
27
  templateLock: 'all',
26
- templateInsertUpdatesSelection: true,
27
28
  } );
28
29
  return el(
29
30
  'div',
@@ -19,6 +19,7 @@
19
19
  registerBlockType( 'test/test-single-svg-icon', {
20
20
  apiVersion: 3,
21
21
  title: 'TestSimpleSvgIcon',
22
+ template: [ [ 'core/paragraph', { content: 'TestSimpleSvgIcon' } ] ],
22
23
  icon: svg,
23
24
  category: 'text',
24
25
 
@@ -29,14 +30,6 @@
29
30
  } );
30
31
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
31
32
  allowedBlocks: [ 'core/paragraph', 'core/image' ],
32
- template: [
33
- [
34
- 'core/paragraph',
35
- {
36
- content: 'TestSimpleSvgIcon',
37
- },
38
- ],
39
- ],
40
33
  } );
41
34
  return el( 'div', innerBlocksProps );
42
35
  },
@@ -56,6 +49,7 @@
56
49
  registerBlockType( 'test/test-dash-icon', {
57
50
  apiVersion: 3,
58
51
  title: 'TestSimpleDashIcon',
52
+ template: [ [ 'core/paragraph', { content: 'TestDashIcon' } ] ],
59
53
  icon: 'cart',
60
54
  category: 'text',
61
55
 
@@ -66,14 +60,6 @@
66
60
  } );
67
61
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
68
62
  allowedBlocks: [ 'core/paragraph', 'core/image' ],
69
- template: [
70
- [
71
- 'core/paragraph',
72
- {
73
- content: 'TestDashIcon',
74
- },
75
- ],
76
- ],
77
63
  } );
78
64
  return el( 'div', innerBlocksProps );
79
65
  },
@@ -93,6 +79,7 @@
93
79
  registerBlockType( 'test/test-function-icon', {
94
80
  apiVersion: 3,
95
81
  title: 'TestFunctionIcon',
82
+ template: [ [ 'core/paragraph', { content: 'TestFunctionIcon' } ] ],
96
83
  icon() {
97
84
  return svg;
98
85
  },
@@ -105,14 +92,6 @@
105
92
  } );
106
93
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
107
94
  allowedBlocks: [ 'core/paragraph', 'core/image' ],
108
- template: [
109
- [
110
- 'core/paragraph',
111
- {
112
- content: 'TestFunctionIcon',
113
- },
114
- ],
115
- ],
116
95
  } );
117
96
  return el( 'div', innerBlocksProps );
118
97
  },
@@ -132,6 +111,7 @@
132
111
  registerBlockType( 'test/test-dash-icon-colors', {
133
112
  apiVersion: 3,
134
113
  title: 'TestDashIconColors',
114
+ template: [ [ 'core/paragraph', { content: 'TestIconColors' } ] ],
135
115
  icon: {
136
116
  background: '#010000',
137
117
  foreground: '#fe0000',
@@ -146,14 +126,6 @@
146
126
  } );
147
127
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
148
128
  allowedBlocks: [ 'core/paragraph', 'core/image' ],
149
- template: [
150
- [
151
- 'core/paragraph',
152
- {
153
- content: 'TestIconColors',
154
- },
155
- ],
156
- ],
157
129
  } );
158
130
  return el( 'div', innerBlocksProps );
159
131
  },
@@ -173,6 +145,7 @@
173
145
  registerBlockType( 'test/test-svg-icon-background', {
174
146
  apiVersion: 3,
175
147
  title: 'TestSvgIconBackground',
148
+ template: [ [ 'core/paragraph', { content: 'TestIconColors' } ] ],
176
149
  icon: {
177
150
  background: '#010000',
178
151
  src: svg,
@@ -186,14 +159,6 @@
186
159
  } );
187
160
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
188
161
  allowedBlocks: [ 'core/paragraph', 'core/image' ],
189
- template: [
190
- [
191
- 'core/paragraph',
192
- {
193
- content: 'TestIconColors',
194
- },
195
- ],
196
- ],
197
162
  } );
198
163
  return el( 'div', innerBlocksProps );
199
164
  },
@@ -87,6 +87,34 @@ function public_queryable_true_public_true_cpt() {
87
87
  }
88
88
  add_action( 'init', 'public_queryable_true_public_true_cpt' );
89
89
 
90
+ /**
91
+ * Registers a custom post type with real-time collaboration disabled.
92
+ */
93
+ function gutenberg_test_register_collaboration_disabled_post_type() {
94
+ register_post_type(
95
+ 'rtc_disabled',
96
+ array(
97
+ 'label' => 'RTC Disabled',
98
+ 'show_in_rest' => true,
99
+ 'public' => true,
100
+ 'supports' => array( 'title', 'editor', 'revisions' ),
101
+ )
102
+ );
103
+ }
104
+ add_action( 'init', 'gutenberg_test_register_collaboration_disabled_post_type' );
105
+
106
+ /**
107
+ * Disables real-time collaboration for the test post type.
108
+ *
109
+ * @param bool $disabled Whether collaboration is disabled.
110
+ * @param string $post_type Post type name.
111
+ * @return bool Whether collaboration is disabled.
112
+ */
113
+ function gutenberg_test_disable_post_type_collaboration( $disabled, $post_type ) {
114
+ return 'rtc_disabled' === $post_type ? true : $disabled;
115
+ }
116
+ add_filter( 'wp_is_post_type_collaboration_disabled', 'gutenberg_test_disable_post_type_collaboration', 10, 2 );
117
+
90
118
  /**
91
119
  * Registers a custom post type that is hierarchical and does not supports the title attribute.
92
120
  */
@@ -0,0 +1,10 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Plugin, Disable Post Revisions
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-disable-post-revisions
8
+ */
9
+
10
+ add_filter( 'wp_revisions_to_keep', '__return_zero' );
@@ -23,11 +23,11 @@
23
23
  title: 'Test Inner Blocks Locking All Embed',
24
24
  icon: 'cart',
25
25
  category: 'text',
26
+ template: TEMPLATE,
26
27
 
27
28
  edit: function Edit() {
28
29
  const blockProps = useBlockProps();
29
30
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
30
- template: TEMPLATE,
31
31
  templateLock: 'all',
32
32
  } );
33
33
  return el( 'div', innerBlocksProps );
@@ -51,15 +51,10 @@
51
51
  title: 'Test Inner Blocks no locking',
52
52
  icon: 'cart',
53
53
  category: 'text',
54
+ template: TEMPLATE,
54
55
 
55
56
  edit: function InnerBlocksNoLockingEdit() {
56
- return el(
57
- 'div',
58
- useBlockProps(),
59
- el( InnerBlocks, {
60
- template: TEMPLATE,
61
- } )
62
- );
57
+ return el( 'div', useBlockProps(), el( InnerBlocks ) );
63
58
  },
64
59
 
65
60
  save,
@@ -70,13 +65,13 @@
70
65
  title: 'Test InnerBlocks locking all',
71
66
  icon: 'cart',
72
67
  category: 'text',
68
+ template: TEMPLATE,
73
69
 
74
70
  edit: function InnerBlocksBlocksLockingAllEdit() {
75
71
  return el(
76
72
  'div',
77
73
  useBlockProps(),
78
74
  el( InnerBlocks, {
79
- template: TEMPLATE,
80
75
  templateLock: 'all',
81
76
  } )
82
77
  );
@@ -133,8 +128,23 @@
133
128
  title: 'Test Inner Blocks Paragraph Placeholder',
134
129
  icon: 'cart',
135
130
  category: 'text',
131
+ template: TEMPLATE_PARAGRAPH_PLACEHOLDER,
132
+ templateInsertUpdatesSelection: true,
136
133
 
137
134
  edit: function InnerBlocksParagraphPlaceholderEdit() {
135
+ return el( 'div', useBlockProps(), el( InnerBlocks ) );
136
+ },
137
+
138
+ save,
139
+ } );
140
+
141
+ registerBlockType( 'test/test-inner-blocks-deprecated-props', {
142
+ apiVersion: 3,
143
+ title: 'Test Inner Blocks deprecated props',
144
+ icon: 'cart',
145
+ category: 'text',
146
+
147
+ edit: function InnerBlocksDeprecatedPropsEdit() {
138
148
  return el(
139
149
  'div',
140
150
  useBlockProps(),
@@ -153,6 +163,7 @@
153
163
  title: 'Test Inner Blocks transformer target',
154
164
  icon: 'cart',
155
165
  category: 'text',
166
+ template: TEMPLATE,
156
167
 
157
168
  transforms: {
158
169
  from: [
@@ -189,13 +200,7 @@
189
200
  },
190
201
 
191
202
  edit: function InnerBlocksTransformerTargetEdit() {
192
- return el(
193
- 'div',
194
- useBlockProps(),
195
- el( InnerBlocks, {
196
- template: TEMPLATE,
197
- } )
198
- );
203
+ return el( 'div', useBlockProps(), el( InnerBlocks ) );
199
204
  },
200
205
 
201
206
  save,
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  window.addEventListener(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  const { state, foo } = store( 'directive-bind', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'directive-class', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  store( 'directive-context', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  store,
6
3
  getContext,
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext, privateApis } from '@wordpress/interactivity';
5
2
 
6
3
  const { directive } = privateApis(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
2
 
6
3
  const html = `
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'directive-on', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, privateApis } from '@wordpress/interactivity';
5
2
 
6
3
  const { directive } = privateApis(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, privateApis } from '@wordpress/interactivity';
5
2
 
6
3
  const { directive } = privateApis(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  store,
6
3
  getContext,
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  store,
6
3
  useInit,
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'directive-style', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext, privateApis } from '@wordpress/interactivity';
5
2
 
6
3
  const { h } = privateApis(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, privateApis } from '@wordpress/interactivity';
5
2
 
6
3
  const { directive } = privateApis(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  const { callbacks } = store( 'test/generator-scope', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  store,
6
3
  getContext,
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  store,
6
3
  getServerState,
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  // This is the "fast" module that loads immediately. It imports
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  // This module will be artificially delayed in the test.
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
2
 
6
3
  store( '', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'negation-operator', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, withSyncEvent, getContext } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'router', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext } from '@wordpress/interactivity';
5
2
  import '@wordpress/interactivity-router';
6
3
 
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  store,
6
3
  getContext,
@@ -1,11 +1,4 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
-
6
- /**
7
- * External dependencies
8
- */
9
2
  // eslint-disable-next-line import/no-unresolved
10
3
  import nameStatic from 'test/router-script-modules-alpha-1';
11
4
  // eslint-disable-next-line import/no-unresolved
@@ -1,11 +1,4 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
-
6
- /**
7
- * External dependencies
8
- */
9
2
  // eslint-disable-next-line import/no-unresolved
10
3
  import nameStatic from 'test/router-script-modules-bravo-1';
11
4
  // eslint-disable-next-line import/no-unresolved
@@ -1,11 +1,4 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
-
6
- /**
7
- * External dependencies
8
- */
9
2
  // eslint-disable-next-line import/no-unresolved
10
3
  import nameStatic from 'test/router-script-modules-charlie-1';
11
4
  // eslint-disable-next-line import/no-unresolved
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getElement } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'test/router-script-modules', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getElement, withSyncEvent } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'test/router-styles', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getElement } from '@wordpress/interactivity';
5
2
 
6
3
  // A non-object state should never be allowed.
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
2
 
6
3
  const { state } = store( 'store-tag', {
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store } from '@wordpress/interactivity';
5
2
 
6
3
  store( 'tovdom', {} );
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, privateApis } from '@wordpress/interactivity';
5
2
 
6
3
  const { directive, h } = privateApis(
@@ -1,6 +1,3 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { store, getContext, withScope } from '@wordpress/interactivity';
5
2
 
6
3
  store( 'with-scope', {
@@ -105,6 +105,6 @@ function gutenberg_test_customize_page_view_config( $data ) {
105
105
  return $data;
106
106
  }
107
107
  add_filter(
108
- 'get_entity_view_config_postType_page',
108
+ 'get_entity_view_config_posttype_page',
109
109
  'gutenberg_test_customize_page_view_config'
110
110
  );