@wordpress/e2e-tests 9.6.1-next.v.202603102151.0 → 9.7.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,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 9.7.0 (2026-03-18)
6
+
5
7
  ## 9.6.0 (2026-03-04)
6
8
 
7
9
  ## 9.5.0 (2026-02-18)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "9.6.1-next.v.202603102151.0+59e17f9ec",
3
+ "version": "9.7.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.41.2-next.v.202603102151.0+59e17f9ec",
28
- "@wordpress/interactivity-router": "^2.41.2-next.v.202603102151.0+59e17f9ec"
27
+ "@wordpress/interactivity": "^6.42.0",
28
+ "@wordpress/interactivity-router": "^2.42.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": "86db21e727d89e8f0dbba9300d2f97fd22b08693"
39
+ "gitHead": "c20787b1778ae64c2db65643b1c236309d68e6ba"
40
40
  }
@@ -0,0 +1,19 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Connectors Empty State
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * Removes the default connector data so the Connectors page renders its empty state.
8
+ *
9
+ * @package gutenberg-test-connectors-empty-state
10
+ */
11
+
12
+ // Remove the Gutenberg filter that provides default connector data.
13
+ add_action(
14
+ 'init',
15
+ static function () {
16
+ remove_filter( 'script_module_data_options-connectors-wp-admin', '_gutenberg_get_connector_script_module_data' );
17
+ },
18
+ PHP_INT_MAX
19
+ );
@@ -0,0 +1,126 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: Gutenberg Test Connectors Provider
4
+ * Plugin URI: https://github.com/WordPress/gutenberg
5
+ * Author: Gutenberg Team
6
+ *
7
+ * Registers a naive AI provider with hardcoded API key validation
8
+ * for E2E testing of the Connectors page setup flow.
9
+ *
10
+ * The valid API key is: test-api-key-123
11
+ *
12
+ * @package gutenberg-test-connectors-provider
13
+ */
14
+
15
+ // phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
16
+ // phpcs:disable WordPress.Files.FileName
17
+ // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
18
+ // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
19
+
20
+ use WordPress\AiClient\AiClient;
21
+ use WordPress\AiClient\Providers\AbstractProvider;
22
+ use WordPress\AiClient\Providers\Contracts\ModelMetadataDirectoryInterface;
23
+ use WordPress\AiClient\Providers\Contracts\ProviderAvailabilityInterface;
24
+ use WordPress\AiClient\Providers\DTO\ProviderMetadata;
25
+ use WordPress\AiClient\Providers\Enums\ProviderTypeEnum;
26
+ use WordPress\AiClient\Providers\Http\Contracts\RequestAuthenticationInterface;
27
+ use WordPress\AiClient\Providers\Http\Contracts\WithRequestAuthenticationInterface;
28
+ use WordPress\AiClient\Providers\Http\DTO\ApiKeyRequestAuthentication;
29
+ use WordPress\AiClient\Providers\Http\Enums\RequestAuthenticationMethod;
30
+ use WordPress\AiClient\Providers\Models\Contracts\ModelInterface;
31
+ use WordPress\AiClient\Providers\Models\DTO\ModelMetadata;
32
+
33
+ /**
34
+ * Availability checker that validates against a hardcoded API key.
35
+ */
36
+ class Gutenberg_Test_Provider_Availability implements ProviderAvailabilityInterface, WithRequestAuthenticationInterface {
37
+
38
+ const VALID_API_KEY = 'test-api-key-123';
39
+
40
+ /**
41
+ * @var RequestAuthenticationInterface|null
42
+ */
43
+ private $authentication = null;
44
+
45
+ public function isConfigured(): bool {
46
+ if ( ! $this->authentication instanceof ApiKeyRequestAuthentication ) {
47
+ return false;
48
+ }
49
+ return $this->authentication->getApiKey() === self::VALID_API_KEY;
50
+ }
51
+
52
+ public function setRequestAuthentication( RequestAuthenticationInterface $authentication ): void {
53
+ $this->authentication = $authentication;
54
+ }
55
+
56
+ public function getRequestAuthentication(): RequestAuthenticationInterface {
57
+ return $this->authentication;
58
+ }
59
+ }
60
+
61
+ /**
62
+ * Empty model metadata directory (no models needed for testing).
63
+ */
64
+ class Gutenberg_Test_Provider_Model_Directory implements ModelMetadataDirectoryInterface {
65
+
66
+ public function listModelMetadata(): array {
67
+ return array();
68
+ }
69
+
70
+ public function hasModelMetadata( string $modelId ): bool {
71
+ return false;
72
+ }
73
+
74
+ public function getModelMetadata( string $modelId ): ModelMetadata {
75
+ throw new \WordPress\AiClient\Common\Exception\InvalidArgumentException(
76
+ sprintf( 'Model not found: %s', $modelId )
77
+ );
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Minimal AI provider for E2E testing.
83
+ */
84
+ class Gutenberg_Test_Provider extends AbstractProvider {
85
+
86
+ protected static function createProviderMetadata(): ProviderMetadata {
87
+ return new ProviderMetadata(
88
+ 'test_provider',
89
+ 'Test Provider',
90
+ ProviderTypeEnum::from( ProviderTypeEnum::CLOUD ),
91
+ null,
92
+ RequestAuthenticationMethod::from( RequestAuthenticationMethod::API_KEY ),
93
+ 'A test AI provider for E2E testing.'
94
+ );
95
+ }
96
+
97
+ protected static function createProviderAvailability(): ProviderAvailabilityInterface {
98
+ return new Gutenberg_Test_Provider_Availability();
99
+ }
100
+
101
+ protected static function createModelMetadataDirectory(): ModelMetadataDirectoryInterface {
102
+ return new Gutenberg_Test_Provider_Model_Directory();
103
+ }
104
+
105
+ protected static function createModel( ModelMetadata $modelMetadata, ProviderMetadata $providerMetadata ): ModelInterface {
106
+ throw new \WordPress\AiClient\Common\Exception\InvalidArgumentException( 'Test provider does not support models.' );
107
+ }
108
+ }
109
+
110
+ // Register the provider in the AiClient registry so it is auto-discovered by the WP_Connector_Registry.
111
+ add_action(
112
+ 'init',
113
+ static function () {
114
+ if ( ! class_exists( '\WordPress\AiClient\AiClient' ) ) {
115
+ return;
116
+ }
117
+ AiClient::defaultRegistry()->registerProvider( Gutenberg_Test_Provider::class );
118
+ }
119
+ );
120
+
121
+ register_deactivation_hook(
122
+ __FILE__,
123
+ static function () {
124
+ delete_option( 'connectors_ai_test_provider_api_key' );
125
+ }
126
+ );
@@ -164,6 +164,9 @@
164
164
  </p>
165
165
  </div>
166
166
 
167
+ <a data-testid="hash-link" href="#hash-link-target">Go to anchor</a>
168
+ <div id="hash-link-target" data-testid="hash-link-target"></div>
169
+
167
170
  <div id="regions-with-attach-to" data-testid="regions-with-attach-to">
168
171
  <?php
169
172
  /*
@@ -91,7 +91,7 @@ add_action(
91
91
  add_filter(
92
92
  'block_bindings_supported_attributes_test/auto-register-with-controls',
93
93
  static function () {
94
- return array( 'title', 'count', 'spacing', 'showEmojis' );
94
+ return array( 'title', 'count', 'spacing', 'showEmojis', 'emoji' );
95
95
  }
96
96
  );
97
97