@wordpress/e2e-tests 9.15.0 → 9.16.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,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 9.16.0 (2026-07-14)
6
+
7
+ ### Enhancements
8
+
9
+ - 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)).
10
+ - Removed the stale `puppeteer-core` peer dependency; the package no longer ships Puppeteer-based tests ([#60357](https://github.com/WordPress/gutenberg/issues/60357)).
11
+
5
12
  ## 9.15.0 (2026-07-01)
6
13
 
7
14
  ## 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.0",
3
+ "version": "9.16.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,17 +24,19 @@
24
24
  "npm": ">=8.19.2"
25
25
  },
26
26
  "dependencies": {
27
- "@wordpress/interactivity": "^6.50.0",
28
- "@wordpress/interactivity-router": "^2.50.0"
27
+ "@wordpress/interactivity": "^6.51.0",
28
+ "@wordpress/interactivity-router": "^2.51.0"
29
+ },
30
+ "devDependencies": {
31
+ "y-websocket": "^3.0.0"
29
32
  },
30
33
  "peerDependencies": {
31
34
  "jest": ">=29",
32
- "puppeteer-core": ">=23",
33
- "react": "^18.0.0",
34
- "react-dom": "^18.0.0"
35
+ "react": "^18 || ^19",
36
+ "react-dom": "^18 || ^19"
35
37
  },
36
38
  "publishConfig": {
37
39
  "access": "public"
38
40
  },
39
- "gitHead": "fee6e24e8e63d36f6bbcf487c193461e9bd79753"
41
+ "gitHead": "e9a74f9c14095a34398ecd4d1f7a908e55051205"
40
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,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
+ }
@@ -105,7 +105,7 @@
105
105
  'div',
106
106
  {
107
107
  className: 'react-18-compat-block__inert',
108
- inert: 'inert',
108
+ inert: '',
109
109
  children:
110
110
  'This subtree is inert and built with the React 18 runtime.',
111
111
  },
@@ -7,7 +7,6 @@
7
7
  * window.__gutenbergTestWebSocketSync.rooms that the Playwright fixtures poll.
8
8
  */
9
9
 
10
- // eslint-disable-next-line import/no-extraneous-dependencies -- declared in test/e2e/package.json, only loaded by the WS e2e harness.
11
10
  import { WebsocketProvider } from 'y-websocket';
12
11
 
13
12
  const TEST_PROVIDER_NAMESPACE = 'gutenberg-test/rtc-websocket-provider';
@@ -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
  },