@wordpress/e2e-tests 9.15.1-next.v.202607070741.0 → 9.17.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
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 9.17.0 (2026-07-29)
6
+
7
+ ## 9.16.0 (2026-07-14)
8
+
9
+ ### Enhancements
10
+
11
+ - Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).
12
+ - Removed the stale `puppeteer-core` peer dependency; the package no longer ships Puppeteer-based tests ([#60357](https://github.com/WordPress/gutenberg/issues/60357)).
13
+
5
14
  ## 9.15.0 (2026-07-01)
6
15
 
7
16
  ## 9.14.0 (2026-06-24)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "9.15.1-next.v.202607070741.0+a51d59513",
3
+ "version": "9.17.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,20 +24,19 @@
24
24
  "npm": ">=8.19.2"
25
25
  },
26
26
  "dependencies": {
27
- "@wordpress/interactivity": "^6.50.1-next.v.202607070741.0+a51d59513",
28
- "@wordpress/interactivity-router": "^2.50.1-next.v.202607070741.0+a51d59513"
27
+ "@wordpress/interactivity": "^6.52.0",
28
+ "@wordpress/interactivity-router": "^2.52.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "y-websocket": "^3.0.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "jest": ">=29",
35
- "puppeteer-core": ">=23",
36
- "react": "^18.0.0",
37
- "react-dom": "^18.0.0"
35
+ "react": "^18 || ^19",
36
+ "react-dom": "^18 || ^19"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public"
41
40
  },
42
- "gitHead": "f637726e370c8b23695ed9af82adbe171ad235d8"
41
+ "gitHead": "7e8b17a983f9391d3ebc7717af2a1c9ed7efc7ab"
43
42
  }
@@ -0,0 +1,100 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Application Password Connector
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * Registers an application password connector for E2E testing.
8
+ *
9
+ * @package gutenberg-test-connectors-application-password
10
+ */
11
+
12
+ const GUTENBERG_TEST_CONNECTOR_CREDENTIALS_SETTING = 'connectors_content_source_test_remote_wordpress_credentials';
13
+ const GUTENBERG_TEST_CONNECTOR_ENV_VAR_NAME = 'GUTENBERG_TEST_CONNECTOR_REMOTE_CREDENTIALS';
14
+
15
+ putenv( GUTENBERG_TEST_CONNECTOR_ENV_VAR_NAME . '=env-remote-user:abcd efgh ijkl mnop 1234' );
16
+
17
+ add_action(
18
+ 'wp_connectors_init',
19
+ static function ( WP_Connector_Registry $registry ) {
20
+ $registry->register(
21
+ 'test-remote-wordpress',
22
+ array(
23
+ 'name' => 'Test Remote WordPress',
24
+ 'description' => 'Connect to example.com as a remote WordPress site.',
25
+ 'type' => 'content_source',
26
+ 'authentication' => array(
27
+ 'method' => 'application_password',
28
+ 'credentials_url' => 'https://example.com/wp-admin/profile.php',
29
+ 'setting_name' => GUTENBERG_TEST_CONNECTOR_CREDENTIALS_SETTING,
30
+ ),
31
+ )
32
+ );
33
+
34
+ $registry->register(
35
+ 'test-env-configured-wordpress',
36
+ array(
37
+ 'name' => 'Test Env Configured WordPress',
38
+ 'description' => 'Connects using environment-variable credentials.',
39
+ 'type' => 'content_source',
40
+ 'authentication' => array(
41
+ 'method' => 'application_password',
42
+ 'env_var_name' => GUTENBERG_TEST_CONNECTOR_ENV_VAR_NAME,
43
+ ),
44
+ )
45
+ );
46
+ }
47
+ );
48
+
49
+ add_action(
50
+ 'rest_api_init',
51
+ static function () {
52
+ register_rest_route(
53
+ 'gutenberg-test-connectors/v1',
54
+ '/application-password',
55
+ array(
56
+ 'methods' => WP_REST_Server::READABLE,
57
+ 'callback' => static function () {
58
+ return array(
59
+ 'is_registered' => wp_is_connector_registered(
60
+ 'test-remote-wordpress'
61
+ ),
62
+ );
63
+ },
64
+ 'permission_callback' => static function () {
65
+ return current_user_can( 'manage_options' );
66
+ },
67
+ )
68
+ );
69
+
70
+ // Exposes the raw stored credentials so tests can assert what was
71
+ // persisted, bypassing the masking applied to /wp/v2/settings.
72
+ register_rest_route(
73
+ 'gutenberg-test-connectors/v1',
74
+ '/application-password-credentials',
75
+ array(
76
+ 'methods' => WP_REST_Server::READABLE,
77
+ 'callback' => static function () {
78
+ $credentials = get_option(
79
+ GUTENBERG_TEST_CONNECTOR_CREDENTIALS_SETTING,
80
+ array()
81
+ );
82
+ return array(
83
+ 'username' => is_array( $credentials ) && isset( $credentials['username'] ) ? $credentials['username'] : '',
84
+ 'password' => is_array( $credentials ) && isset( $credentials['password'] ) ? $credentials['password'] : '',
85
+ );
86
+ },
87
+ 'permission_callback' => static function () {
88
+ return current_user_can( 'manage_options' );
89
+ },
90
+ )
91
+ );
92
+ }
93
+ );
94
+
95
+ register_deactivation_hook(
96
+ __FILE__,
97
+ static function () {
98
+ delete_option( GUTENBERG_TEST_CONNECTOR_CREDENTIALS_SETTING );
99
+ }
100
+ );
@@ -0,0 +1,18 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Plugin: Disable Cross-Origin Isolation
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-disable-cross-origin-isolation
8
+ */
9
+
10
+ /*
11
+ * Skip the Document-Isolation-Policy header while leaving client-side media
12
+ * processing enabled. Without cross-origin isolation, SharedArrayBuffer is
13
+ * unavailable, so the full VIPS/WASM pipeline fails feature detection and the
14
+ * editor falls back to the HEIC canvas conversion mode — mirroring Safari,
15
+ * where full client-side processing is unsupported but HEIC files are still
16
+ * converted to JPEG via createImageBitmap + OffscreenCanvas before upload.
17
+ */
18
+ add_filter( 'gutenberg_use_document_isolation_policy', '__return_false' );
@@ -0,0 +1,29 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Guidelines Scopes Filter
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-guidelines-scopes-filter
8
+ */
9
+
10
+ /**
11
+ * Exercises the `wp_guideline_scopes` filter for e2e tests: adds a custom
12
+ * scope and removes the built-in `blocks` scope. The Settings -> Guidelines
13
+ * page should grow the custom section and drop the Blocks section.
14
+ *
15
+ * @param array $scopes Slug-keyed map of guideline scopes.
16
+ * @return array Filtered scopes.
17
+ */
18
+ function gutenberg_test_filter_guideline_scopes( $scopes ) {
19
+ unset( $scopes['blocks'] );
20
+
21
+ $scopes['e2e-custom'] = array(
22
+ 'title' => 'E2E Custom',
23
+ 'description' => 'A custom guideline scope added by an e2e test plugin.',
24
+ 'order' => 45,
25
+ );
26
+
27
+ return $scopes;
28
+ }
29
+ add_filter( 'wp_guideline_scopes', 'gutenberg_test_filter_guideline_scopes' );
@@ -9,15 +9,19 @@
9
9
  }
10
10
 
11
11
  .grid-item {
12
- float: left;
13
- width: 80px;
14
- height: 60px;
15
- background: #D26;
16
- border: 2px solid #333;
17
- border-color: hsla(0, 0%, 0%, 0.5);
18
- border-radius: 5px;
19
- box-sizing: border-box;
12
+ float: left;
13
+ width: 80px;
14
+ height: 60px;
15
+ background: #d26;
16
+ border: 2px solid #333;
17
+ border-color: hsla(0, 0%, 0%, 0.5);
18
+ border-radius: 5px;
19
+ box-sizing: border-box;
20
20
  }
21
21
 
22
- .grid-item--width2 { width: 160px; }
23
- .grid-item--height2 { height: 140px; }
22
+ .grid-item--width2 {
23
+ width: 160px;
24
+ }
25
+ .grid-item--height2 {
26
+ height: 140px;
27
+ }
@@ -2,6 +2,6 @@
2
2
  * The following styles get applied both on the front of your site and in the
3
3
  * editor.
4
4
  */
5
- .wp-block-test-iframed-multiple-stylesheets {
5
+ .wp-block-test-iframed-multiple-stylesheets {
6
6
  background-color: #000 !important;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  .blue-from-link {
2
- color: rgb(0, 0, 255);
2
+ color: rgb(0, 0, 255);
3
3
  }
4
4
 
5
5
  .background-from-link {
6
- background-image: url('./assets/10x10_e2e_test_image_blue.png');
7
- }
6
+ background-image: url(./assets/10x10_e2e_test_image_blue.png);
7
+ }
@@ -1,4 +1,4 @@
1
1
  .wp-block-test-router-styles-blue,
2
- .blue {
3
- color: rgb(0, 0, 255);
4
- }
2
+ .blue {
3
+ color: rgb(0, 0, 255);
4
+ }
@@ -1,7 +1,7 @@
1
1
  .green-from-link {
2
- color: rgb(0, 255, 0);
2
+ color: rgb(0, 255, 0);
3
3
  }
4
4
 
5
5
  .background-from-link {
6
- background-image: url('./assets/10x10_e2e_test_image_green.png');
7
- }
6
+ background-image: url(./assets/10x10_e2e_test_image_green.png);
7
+ }
@@ -1,4 +1,4 @@
1
1
  .wp-block-test-router-styles-green,
2
2
  .green {
3
- color: rgb(0, 255, 0);
4
- }
3
+ color: rgb(0, 255, 0);
4
+ }
@@ -1,7 +1,7 @@
1
1
  .red-from-link {
2
- color: rgb(255, 0, 0);
2
+ color: rgb(255, 0, 0);
3
3
  }
4
4
 
5
5
  .background-from-link {
6
- background-image: url('./assets/10x10_e2e_test_image_red.png');
7
- }
6
+ background-image: url(./assets/10x10_e2e_test_image_red.png);
7
+ }
@@ -1,4 +1,4 @@
1
1
  .wp-block-test-router-styles-red,
2
2
  .red {
3
- color: rgb(255, 0, 0);
4
- }
3
+ color: rgb(255, 0, 0);
4
+ }
@@ -1,7 +1,8 @@
1
+ /* stylelint-disable no-duplicate-selectors -- Intentional duplicate selectors test rule order preservation during client-side navigation. */
1
2
  .wp-block-test-router-styles-wrapper .order-checker {
2
- color: rgb(255, 0, 0);
3
+ color: rgb(255, 0, 0);
3
4
  }
4
5
 
5
6
  .wp-block-test-router-styles-wrapper .order-checker {
6
- color: rgb(0, 255, 0);
7
- }
7
+ color: rgb(0, 255, 0);
8
+ }
@@ -1,3 +1,3 @@
1
1
  .wp-block-test-router-styles-wrapper .hide-on-print {
2
- display: none;
3
- }
2
+ display: none;
3
+ }
@@ -1,3 +1,3 @@
1
1
  .wp-block-test-router-styles-wrapper {
2
- color: rgb(160, 12, 60);
3
- }
2
+ color: rgb(160, 12, 60);
3
+ }
@@ -12,6 +12,8 @@
12
12
  */
13
13
  function gutenberg_test_meta_box_render_meta_box() {
14
14
  echo 'Hello World';
15
+ echo '<label for="gutenberg_test_meta_box_input">Test meta box field</label>';
16
+ echo '<input type="text" id="gutenberg_test_meta_box_input" name="gutenberg_test_meta_box_input" />';
15
17
  }
16
18
 
17
19
  /**
@@ -99,18 +99,26 @@
99
99
  return jsx( 'div', {
100
100
  ...blockProps,
101
101
  children: [
102
- // An element that relies on the `inert` attribute, created with
103
- // the bundled React 18 runtime (legacy `react.element` symbol).
104
102
  jsxDEV(
105
103
  'div',
106
104
  {
107
- className: 'react-18-compat-block__inert',
105
+ className: 'react-18-compat-block__inert-string',
108
106
  inert: '',
109
107
  children:
110
- 'This subtree is inert and built with the React 18 runtime.',
108
+ 'This subtree is inert and uses a React 18 style string attribute.',
111
109
  },
112
110
  'inert'
113
111
  ),
112
+ jsx(
113
+ 'div',
114
+ {
115
+ className: 'react-18-compat-block__inert-boolean',
116
+ inert: true,
117
+ children:
118
+ 'This subtree is inert and uses a React 19 style boolean attribute.',
119
+ },
120
+ 'inert-boolean'
121
+ ),
114
122
  // The `defaultProps` component, created with the
115
123
  // externalized React runtime.
116
124
  jsx( Greeting, {}, 'greeting' ),
@@ -28,7 +28,6 @@
28
28
  value: attributes.count || 0,
29
29
  min: 0,
30
30
  max: 10,
31
- __next40pxDefaultSize: true,
32
31
  onChange: ( value ) => {
33
32
  setAttributes( { count: value } );
34
33
  },
@@ -0,0 +1,95 @@
1
+ ( function () {
2
+ const { registerBlockType } = wp.blocks;
3
+ const { useBlockProps } = wp.blockEditor;
4
+ const { createElement: el } = wp.element;
5
+
6
+ function getHeadingTagName( level ) {
7
+ return Number.isInteger( level ) && level >= 1 && level <= 6
8
+ ? `h${ level }`
9
+ : 'h2';
10
+ }
11
+
12
+ function getAnchorProps( anchor ) {
13
+ return typeof anchor === 'string' && anchor !== ''
14
+ ? { id: anchor }
15
+ : {};
16
+ }
17
+
18
+ registerBlockType( 'e2e-tests/table-of-contents-heading-source', {
19
+ apiVersion: 3,
20
+ title: 'ToC Heading Source',
21
+ description: 'A test block that renders a heading-like section.',
22
+ category: 'text',
23
+ attributes: {
24
+ content: {
25
+ type: 'string',
26
+ default: 'Plugin heading source',
27
+ },
28
+ anchor: {
29
+ type: 'string',
30
+ default: 'plugin-heading-source',
31
+ },
32
+ level: {
33
+ type: 'number',
34
+ default: 2,
35
+ },
36
+ },
37
+ edit: function Edit( { attributes } ) {
38
+ const TagName = getHeadingTagName( attributes.level );
39
+
40
+ return el(
41
+ TagName,
42
+ useBlockProps( getAnchorProps( attributes.anchor ) ),
43
+ attributes.content
44
+ );
45
+ },
46
+ save: function Save( { attributes } ) {
47
+ const TagName = getHeadingTagName( attributes.level );
48
+
49
+ return el(
50
+ TagName,
51
+ useBlockProps.save( getAnchorProps( attributes.anchor ) ),
52
+ attributes.content
53
+ );
54
+ },
55
+ } );
56
+
57
+ registerBlockType( 'e2e-tests/table-of-contents-heading-like', {
58
+ apiVersion: 3,
59
+ title: 'ToC Heading Like',
60
+ description: 'A test block that renders a heading-like section.',
61
+ category: 'text',
62
+ attributes: {
63
+ content: {
64
+ type: 'string',
65
+ default: 'Plain heading-like block',
66
+ },
67
+ anchor: {
68
+ type: 'string',
69
+ default: 'unregistered-heading-like-source',
70
+ },
71
+ level: {
72
+ type: 'number',
73
+ default: 2,
74
+ },
75
+ },
76
+ edit: function Edit( { attributes } ) {
77
+ const TagName = getHeadingTagName( attributes.level );
78
+
79
+ return el(
80
+ TagName,
81
+ useBlockProps( getAnchorProps( attributes.anchor ) ),
82
+ attributes.content
83
+ );
84
+ },
85
+ save: function Save( { attributes } ) {
86
+ const TagName = getHeadingTagName( attributes.level );
87
+
88
+ return el(
89
+ TagName,
90
+ useBlockProps.save( getAnchorProps( attributes.anchor ) ),
91
+ attributes.content
92
+ );
93
+ },
94
+ } );
95
+ } )();
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Table of Contents Heading Source
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-table-of-contents-heading-source
8
+ */
9
+
10
+ /**
11
+ * Enqueues the test block used by Table of Contents e2e coverage in the block editor.
12
+ */
13
+ function gutenberg_test_table_of_contents_heading_source_enqueue() {
14
+ wp_enqueue_script(
15
+ 'gutenberg-test-table-of-contents-heading-source',
16
+ plugins_url( 'table-of-contents-heading-source/index.js', __FILE__ ),
17
+ array(
18
+ 'wp-blocks',
19
+ 'wp-block-editor',
20
+ 'wp-element',
21
+ ),
22
+ filemtime( plugin_dir_path( __FILE__ ) . 'table-of-contents-heading-source/index.js' ),
23
+ true
24
+ );
25
+ }
26
+
27
+ add_action( 'enqueue_block_editor_assets', 'gutenberg_test_table_of_contents_heading_source_enqueue' );
@@ -0,0 +1,110 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test View Config Extensibility
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * @package gutenberg-test-view-config-extensibility
8
+ */
9
+
10
+ /**
11
+ * Customizes the Pages view configuration for end-to-end testing.
12
+ *
13
+ * @param Gutenberg_View_Config_Data $data The Pages view configuration.
14
+ * @return Gutenberg_View_Config_Data The customized configuration.
15
+ */
16
+ function gutenberg_test_customize_page_view_config( $data ) {
17
+ $data->merge(
18
+ array(
19
+ 'default_view' => array(
20
+ 'type' => 'table',
21
+ 'sort' => array(
22
+ 'field' => 'date',
23
+ 'direction' => 'desc',
24
+ ),
25
+ ),
26
+ 'view_list' => array(
27
+ array(
28
+ 'slug' => 'drafts',
29
+ 'title' => 'In progress',
30
+ 'view' => array(
31
+ 'filters' => array(
32
+ array(
33
+ 'field' => 'date',
34
+ 'operator' => 'after',
35
+ 'value' => '2018-01-01T00:00:00',
36
+ 'isLocked' => true,
37
+ ),
38
+ ),
39
+ ),
40
+ ),
41
+ array(
42
+ 'slug' => 'published-after-2020',
43
+ 'title' => 'Published after 2020',
44
+ 'view' => array(
45
+ 'filters' => array(
46
+ array(
47
+ 'field' => 'status',
48
+ 'operator' => 'isAny',
49
+ 'value' => 'publish',
50
+ 'isLocked' => true,
51
+ ),
52
+ array(
53
+ 'field' => 'date',
54
+ 'operator' => 'after',
55
+ 'value' => '2020-12-31T23:59:59',
56
+ 'isLocked' => true,
57
+ ),
58
+ ),
59
+ ),
60
+ ),
61
+ ),
62
+ 'form' => array(
63
+ 'layout' => array( 'type' => 'regular' ),
64
+ ),
65
+ ),
66
+ 1
67
+ );
68
+
69
+ $data->remove(
70
+ array(
71
+ 'default_view' => array(
72
+ 'fields' => array( 'author' ),
73
+ ),
74
+ 'view_list' => array( 'future' ),
75
+ ),
76
+ 1
77
+ );
78
+
79
+ $data->set(
80
+ array(
81
+ 'default_layouts' => array(
82
+ 'table' => array(
83
+ 'layout' => array(
84
+ 'styles' => array(
85
+ 'status' => array(
86
+ 'width' => '240px',
87
+ ),
88
+ ),
89
+ ),
90
+ ),
91
+ ),
92
+ ),
93
+ 1
94
+ );
95
+
96
+ $data->replace(
97
+ array(
98
+ 'form' => array(
99
+ 'fields' => array( 'slug' ),
100
+ ),
101
+ ),
102
+ 1
103
+ );
104
+
105
+ return $data;
106
+ }
107
+ add_filter(
108
+ 'get_entity_view_config_postType_page',
109
+ 'gutenberg_test_customize_page_view_config'
110
+ );