@wordpress/e2e-tests 9.1.1-next.738bb1424.0 → 9.2.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.2.0 (2025-12-23)
6
+
5
7
  ## 9.1.0 (2025-11-26)
6
8
 
7
9
  ## 9.0.0 (2025-11-12)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/e2e-tests",
3
- "version": "9.1.1-next.738bb1424.0",
3
+ "version": "9.2.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,11 +24,11 @@
24
24
  "npm": ">=8.19.2"
25
25
  },
26
26
  "dependencies": {
27
- "@wordpress/interactivity": "^6.36.1-next.738bb1424.0",
28
- "@wordpress/interactivity-router": "^2.36.1-next.738bb1424.0"
27
+ "@wordpress/interactivity": "^6.37.0",
28
+ "@wordpress/interactivity-router": "^2.37.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "ab1b004c0d61c295aa34bc86ea07f979343983ce"
33
+ "gitHead": "2cf13ec6cf86153c9b3cf369bf5c59046f5cd950"
34
34
  }
@@ -84,6 +84,7 @@ const withBlockBindingsInspectorControl = createHigherOrderComponent(
84
84
  { title: 'Bindings' },
85
85
  el( TextControl, {
86
86
  __next40pxDefaultSize: true,
87
+ __nextHasNoMarginBottom: true,
87
88
  label: 'Content',
88
89
  value: props.attributes.content,
89
90
  onChange: ( content ) =>
@@ -3,115 +3,88 @@
3
3
  const PanelBody = wp.components.PanelBody;
4
4
  const select = wp.data.select;
5
5
  const dispatch = wp.data.dispatch;
6
- const useSelect = wp.data.useSelect;
7
- const useDispatch = wp.data.useDispatch;
8
6
  const Fragment = wp.element.Fragment;
9
7
  const el = wp.element.createElement;
10
- const useState = wp.element.useState;
11
- const useEffect = wp.element.useEffect;
8
+ const Component = wp.element.Component;
12
9
  const __ = wp.i18n.__;
13
10
  const registerPlugin = wp.plugins.registerPlugin;
14
11
  const PluginSidebar = wp.editor.PluginSidebar;
15
12
  const PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;
16
13
 
17
- function SidebarContents() {
18
- const [ range, setRange ] = useState( { start: 0, end: 0 } );
14
+ class SidebarContents extends Component {
15
+ constructor( props ) {
16
+ super( props );
19
17
 
20
- const blocks = useSelect( ( sel ) => {
21
- return sel( 'core/block-editor' ).getBlocks();
22
- } );
18
+ this.state = {
19
+ start: 0,
20
+ end: 0,
21
+ };
22
+ }
23
23
 
24
- const { __experimentalAddAnnotation: addAnnotation } =
25
- useDispatch( 'core/annotations' );
26
-
27
- const allBlocks = blocks
28
- .filter( ( block ) => block.name === 'core/paragraph' )
29
- .map( ( block ) => [
30
- block.clientId,
31
- block.attributes.content.text,
32
- ] );
33
-
34
- useEffect( () => {
35
- allBlocks.forEach( ( [ clientId, content ] ) => {
36
- const applePosition = content.indexOf( 'apple' );
37
- if ( applePosition !== -1 ) {
38
- addAnnotation( {
39
- source: 'test-annotation',
40
- blockClientId: clientId,
41
- richTextIdentifier: 'content',
42
- range: {
43
- start: applePosition,
44
- end: applePosition + 5,
45
- },
46
- } );
47
- }
48
- } );
49
- } );
50
-
51
- return el(
52
- PanelBody,
53
- {},
54
- el( 'input', {
55
- type: 'number',
56
- id: 'annotations-tests-range-start',
57
- onChange: ( reactEvent ) => {
58
- setRange( {
59
- ...range,
60
- start: reactEvent.target.value,
61
- } );
62
- },
63
- value: range.start,
64
- } ),
65
- el( 'input', {
66
- type: 'number',
67
- id: 'annotations-tests-range-end',
68
- onChange: ( reactEvent ) => {
69
- setRange( {
70
- ...range,
71
- end: reactEvent.target.value,
72
- } );
73
- },
74
- value: range.end,
75
- } ),
76
- el(
77
- Button,
78
- {
79
- variant: 'primary',
80
- onClick: () => {
81
- dispatch(
82
- 'core/annotations'
83
- ).__experimentalAddAnnotation( {
84
- source: 'e2e-tests',
85
- blockClientId:
86
- select(
87
- 'core/block-editor'
88
- ).getBlockOrder()[ 0 ],
89
- richTextIdentifier: 'content',
90
- range: {
91
- start: parseInt( range.start, 10 ),
92
- end: parseInt( range.end, 10 ),
93
- },
24
+ render() {
25
+ return el(
26
+ PanelBody,
27
+ {},
28
+ el( 'input', {
29
+ type: 'number',
30
+ id: 'annotations-tests-range-start',
31
+ onChange: ( reactEvent ) => {
32
+ this.setState( {
33
+ start: reactEvent.target.value,
94
34
  } );
95
35
  },
96
- },
97
- __( 'Add annotation' )
98
- ),
99
- el(
100
- Button,
101
- {
102
- variant: 'primary',
103
- onClick: () => {
104
- dispatch(
105
- 'core/annotations'
106
- ).__experimentalRemoveAnnotationsBySource(
107
- 'e2e-tests'
108
- );
36
+ value: this.state.start,
37
+ } ),
38
+ el( 'input', {
39
+ type: 'number',
40
+ id: 'annotations-tests-range-end',
41
+ onChange: ( reactEvent ) => {
42
+ this.setState( {
43
+ end: reactEvent.target.value,
44
+ } );
45
+ },
46
+ value: this.state.end,
47
+ } ),
48
+ el(
49
+ Button,
50
+ {
51
+ variant: 'primary',
52
+ onClick: () => {
53
+ dispatch(
54
+ 'core/annotations'
55
+ ).__experimentalAddAnnotation( {
56
+ source: 'e2e-tests',
57
+ blockClientId:
58
+ select(
59
+ 'core/block-editor'
60
+ ).getBlockOrder()[ 0 ],
61
+ richTextIdentifier: 'content',
62
+ range: {
63
+ start: parseInt( this.state.start, 10 ),
64
+ end: parseInt( this.state.end, 10 ),
65
+ },
66
+ } );
67
+ },
68
+ },
69
+ __( 'Add annotation' )
70
+ ),
71
+ el(
72
+ Button,
73
+ {
74
+ variant: 'primary',
75
+ onClick: () => {
76
+ dispatch(
77
+ 'core/annotations'
78
+ ).__experimentalRemoveAnnotationsBySource(
79
+ 'e2e-tests'
80
+ );
81
+ },
109
82
  },
110
- },
111
83
 
112
- __( 'Remove annotations' )
113
- )
114
- );
84
+ __( 'Remove annotations' )
85
+ )
86
+ );
87
+ }
115
88
  }
116
89
 
117
90
  function AnnotationsSidebar() {