@wordpress/e2e-tests 7.18.1 → 7.19.1-next.79a6196f.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 (57) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE.md +1 -1
  3. package/jest.config.js +0 -1
  4. package/package.json +8 -9
  5. package/plugins/iframed-block/block.json +1 -0
  6. package/plugins/iframed-inline-styles/block.json +1 -0
  7. package/plugins/iframed-masonry-block/block.json +1 -0
  8. package/plugins/iframed-multiple-stylesheets/block.json +1 -0
  9. package/plugins/interactive-blocks/directive-bind/block.json +1 -0
  10. package/plugins/interactive-blocks/directive-body/block.json +1 -0
  11. package/plugins/interactive-blocks/directive-class/block.json +1 -0
  12. package/plugins/interactive-blocks/directive-context/block.json +1 -0
  13. package/plugins/interactive-blocks/directive-init/block.json +1 -0
  14. package/plugins/interactive-blocks/directive-key/block.json +1 -0
  15. package/plugins/interactive-blocks/directive-on/block.json +1 -0
  16. package/plugins/interactive-blocks/directive-priorities/block.json +1 -0
  17. package/plugins/interactive-blocks/directive-slots/block.json +1 -0
  18. package/plugins/interactive-blocks/directive-style/block.json +1 -0
  19. package/plugins/interactive-blocks/directive-text/block.json +1 -0
  20. package/plugins/interactive-blocks/directive-watch/block.json +1 -0
  21. package/plugins/interactive-blocks/negation-operator/block.json +1 -0
  22. package/plugins/interactive-blocks/router-navigate/block.json +1 -0
  23. package/plugins/interactive-blocks/router-navigate/render.php +1 -0
  24. package/plugins/interactive-blocks/router-regions/block.json +1 -0
  25. package/plugins/interactive-blocks/router-regions/render.php +1 -0
  26. package/plugins/interactive-blocks/store-tag/block.json +1 -0
  27. package/plugins/interactive-blocks/store-tag/render.php +1 -0
  28. package/plugins/interactive-blocks/tovdom/block.json +1 -0
  29. package/plugins/interactive-blocks/tovdom-islands/block.json +1 -0
  30. package/plugins/interactive-blocks/tovdom-islands/render.php +12 -0
  31. package/plugins/pattern-recursion.php +22 -0
  32. package/specs/editor/various/change-detection.test.js +5 -1
  33. package/specs/editor/various/inserting-blocks.test.js +3 -5
  34. package/specs/editor/plugins/innerblocks-locking-all-embed.js +0 -56
  35. package/specs/editor/various/__snapshots__/block-editor-keyboard-shortcuts.test.js.snap +0 -153
  36. package/specs/editor/various/allowed-patterns.test.js +0 -74
  37. package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +0 -110
  38. package/specs/editor/various/block-switcher.test.js +0 -130
  39. package/specs/editor/various/core-settings.test.js +0 -42
  40. package/specs/editor/various/datepicker.test.js +0 -148
  41. package/specs/editor/various/dropdown-menu.test.js +0 -143
  42. package/specs/editor/various/editor-modes.test.js +0 -160
  43. package/specs/editor/various/invalid-block.test.js +0 -100
  44. package/specs/editor/various/nux.test.js +0 -158
  45. package/specs/editor/various/preferences.test.js +0 -58
  46. package/specs/editor/various/publish-panel.test.js +0 -82
  47. package/specs/editor/various/publishing.test.js +0 -176
  48. package/specs/editor/various/scheduling.test.js +0 -65
  49. package/specs/editor/various/sidebar.test.js +0 -168
  50. package/specs/editor/various/taxonomies.test.js +0 -251
  51. package/specs/experiments/blocks/post-comments-form.test.js +0 -53
  52. package/specs/experiments/experimental-features.js +0 -39
  53. package/specs/experiments/fixtures/menu-items-request-fixture.json +0 -84
  54. package/specs/site-editor/multi-entity-saving.test.js +0 -239
  55. package/specs/site-editor/settings-sidebar.test.js +0 -122
  56. package/specs/site-editor/site-editor-export.test.js +0 -63
  57. package/specs/widgets/editing-widgets.test.js +0 -962
@@ -1,160 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import {
5
- clickBlockAppender,
6
- clickBlockToolbarButton,
7
- clickMenuItem,
8
- createNewPost,
9
- getCurrentPostContent,
10
- switchEditorModeTo,
11
- pressKeyTimes,
12
- pressKeyWithModifier,
13
- openTypographyToolsPanelMenu,
14
- canvas,
15
- } from '@wordpress/e2e-test-utils';
16
-
17
- describe( 'Editing modes (visual/HTML)', () => {
18
- beforeEach( async () => {
19
- await createNewPost();
20
- await clickBlockAppender();
21
- await page.keyboard.type( 'Hello world!' );
22
- } );
23
-
24
- it( 'should switch between visual and HTML modes', async () => {
25
- // This block should be in "visual" mode by default.
26
- let visualBlock = await canvas().$$( '[data-block].rich-text' );
27
- expect( visualBlock ).toHaveLength( 1 );
28
-
29
- // Change editing mode from "Visual" to "HTML".
30
- await clickBlockToolbarButton( 'Options' );
31
- await clickMenuItem( 'Edit as HTML' );
32
-
33
- // Wait for the block to be converted to HTML editing mode.
34
- const htmlBlock = await canvas().$$(
35
- '[data-block] .block-editor-block-list__block-html-textarea'
36
- );
37
- expect( htmlBlock ).toHaveLength( 1 );
38
-
39
- // Change editing mode from "HTML" back to "Visual".
40
- await clickBlockToolbarButton( 'Options' );
41
- await clickMenuItem( 'Edit visually' );
42
-
43
- // This block should be in "visual" mode by default.
44
- visualBlock = await canvas().$$( '[data-block].rich-text' );
45
- expect( visualBlock ).toHaveLength( 1 );
46
- } );
47
-
48
- it( 'should display sidebar in HTML mode', async () => {
49
- // Change editing mode from "Visual" to "HTML".
50
- await clickBlockToolbarButton( 'Options' );
51
- await clickMenuItem( 'Edit as HTML' );
52
-
53
- // The `drop cap` toggle for the paragraph block should appear, even in
54
- // HTML editing mode.
55
- await openTypographyToolsPanelMenu();
56
- await page.click( 'button[aria-label="Show Drop cap"]' );
57
-
58
- const dropCapToggle = await page.$x(
59
- "//label[contains(text(), 'Drop cap')]"
60
- );
61
-
62
- expect( dropCapToggle ).toHaveLength( 1 );
63
- } );
64
-
65
- it( 'should update HTML in HTML mode when sidebar is used', async () => {
66
- // Change editing mode from "Visual" to "HTML".
67
- await clickBlockToolbarButton( 'Options' );
68
- await clickMenuItem( 'Edit as HTML' );
69
-
70
- // Make sure the paragraph content is rendered as expected.
71
- let htmlBlockContent = await canvas().$eval(
72
- '.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-html-textarea',
73
- ( node ) => node.textContent
74
- );
75
- expect( htmlBlockContent ).toEqual( '<p>Hello world!</p>' );
76
-
77
- // Change the `drop cap` using the sidebar.
78
- await openTypographyToolsPanelMenu();
79
- await page.click( 'button[aria-label="Show Drop cap"]' );
80
-
81
- const [ dropCapToggle ] = await page.$x(
82
- "//label[contains(text(), 'Drop cap')]"
83
- );
84
- await dropCapToggle.click();
85
-
86
- // Make sure the HTML content updated.
87
- htmlBlockContent = await canvas().$eval(
88
- '.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-html-textarea',
89
- ( node ) => node.textContent
90
- );
91
- expect( htmlBlockContent ).toEqual(
92
- '<p class="has-drop-cap">Hello world!</p>'
93
- );
94
- } );
95
-
96
- it( 'the code editor should unselect blocks and disable the inserter', async () => {
97
- // The paragraph block should be selected.
98
- const title = await page.$eval(
99
- '.block-editor-block-card__title',
100
- ( element ) => element.innerText
101
- );
102
- expect( title ).toBe( 'Paragraph' );
103
-
104
- // The Block inspector should be active.
105
- let blockInspectorTab = await page.$(
106
- '.edit-post-sidebar__panel-tab.is-active[data-label="Block"]'
107
- );
108
- expect( blockInspectorTab ).not.toBeNull();
109
-
110
- await switchEditorModeTo( 'Code' );
111
-
112
- // The Block inspector should not be active anymore.
113
- blockInspectorTab = await page.$(
114
- '.edit-post-sidebar__panel-tab.is-active[data-label="Block"]'
115
- );
116
- expect( blockInspectorTab ).toBeNull();
117
-
118
- // No block is selected.
119
- await page.click( '.edit-post-sidebar__panel-tab[data-label="Block"]' );
120
- const noBlocksElement = await page.$(
121
- '.block-editor-block-inspector__no-blocks'
122
- );
123
- expect( noBlocksElement ).not.toBeNull();
124
-
125
- // The inserter is disabled.
126
- const disabledInserter = await page.$(
127
- '.edit-post-header-toolbar__inserter-toggle:disabled, .edit-post-header-toolbar__inserter-toggle[aria-disabled="true"]'
128
- );
129
- expect( disabledInserter ).not.toBeNull();
130
- } );
131
-
132
- // Test for regressions of https://github.com/WordPress/gutenberg/issues/24054.
133
- it( 'saves content when using the shortcut in the Code Editor', async () => {
134
- await switchEditorModeTo( 'Code' );
135
-
136
- const textContent = await page.evaluate(
137
- () => document.querySelector( '.editor-post-text-editor' ).value
138
- );
139
- const editPosition = textContent.indexOf( 'Hello' );
140
-
141
- // Replace the word 'Hello' with 'Hi'.
142
- await canvas().click( '.editor-post-title__input' );
143
- await page.keyboard.press( 'Tab' );
144
- await pressKeyTimes( 'ArrowRight', editPosition );
145
- await pressKeyTimes( 'Delete', 5 );
146
- await page.keyboard.type( 'Hi' );
147
-
148
- // Save the post using the shortcut.
149
- await pressKeyWithModifier( 'primary', 's' );
150
- await page.waitForSelector( '.editor-post-saved-state.is-saved' );
151
-
152
- await switchEditorModeTo( 'Visual' );
153
-
154
- expect( await getCurrentPostContent() ).toMatchInlineSnapshot( `
155
- "<!-- wp:paragraph -->
156
- <p>Hi world!</p>
157
- <!-- /wp:paragraph -->"
158
- ` );
159
- } );
160
- } );
@@ -1,100 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import {
5
- clickMenuItem,
6
- createNewPost,
7
- clickBlockAppender,
8
- clickBlockToolbarButton,
9
- setPostContent,
10
- canvas,
11
- } from '@wordpress/e2e-test-utils';
12
-
13
- describe( 'invalid blocks', () => {
14
- beforeEach( async () => {
15
- await createNewPost();
16
- } );
17
-
18
- it( 'Should show an invalid block message with clickable options', async () => {
19
- // Create an empty paragraph with the focus in the block.
20
- await clickBlockAppender();
21
- await page.keyboard.type( 'hello' );
22
-
23
- await clickBlockToolbarButton( 'Options' );
24
-
25
- // Change to HTML mode and close the options.
26
- await clickMenuItem( 'Edit as HTML' );
27
-
28
- // Focus on the textarea and enter an invalid paragraph
29
- await canvas().click(
30
- '.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-html-textarea'
31
- );
32
- await page.keyboard.type( '<p>invalid paragraph' );
33
-
34
- // Takes the focus away from the block so the invalid warning is triggered
35
- await page.click( '.editor-post-save-draft' );
36
-
37
- // Click on the 'three-dots' menu toggle.
38
- await canvas().click(
39
- '.block-editor-warning__actions button[aria-label="More options"]'
40
- );
41
-
42
- await clickMenuItem( 'Resolve' );
43
-
44
- // Check we get the resolve modal with the appropriate contents.
45
- const htmlBlockContent = await page.$eval(
46
- '.block-editor-block-compare__html',
47
- ( node ) => node.textContent
48
- );
49
- expect( htmlBlockContent ).toEqual(
50
- '<p>hello</p><p>invalid paragraph'
51
- );
52
- } );
53
-
54
- it( 'should strip potentially malicious on* attributes', async () => {
55
- let hasAlert = false;
56
-
57
- page.on( 'dialog', () => {
58
- hasAlert = true;
59
- } );
60
-
61
- // The paragraph block contains invalid HTML, which causes it to be an
62
- // invalid block.
63
- await setPostContent(
64
- `
65
- <!-- wp:paragraph -->
66
- <p>aaaa <img src onerror=alert(1)></x dde></x>1
67
- <!-- /wp:paragraph -->
68
- `
69
- );
70
-
71
- // Give the browser time to show the alert.
72
- await page.evaluate( () => new Promise( window.requestIdleCallback ) );
73
-
74
- expect( console ).toHaveWarned();
75
- expect( console ).toHaveErrored();
76
- expect( hasAlert ).toBe( false );
77
- } );
78
-
79
- it( 'should not trigger malicious script tags when using a shortcode block', async () => {
80
- let hasAlert = false;
81
-
82
- page.on( 'dialog', () => {
83
- hasAlert = true;
84
- } );
85
-
86
- // The shortcode block contains invalid HTML, which causes it to be an
87
- // invalid block.
88
- await setPostContent(
89
- `
90
- <!-- wp:shortcode -->
91
- <animate onbegin=alert(1) attributeName=x dur=1s><script>alert("EVIL");</script><style>@keyframes x{}</style><a style="animation-name:x" onanimationstart="alert(2)"></a>
92
- <!-- /wp:shortcode -->
93
- `
94
- );
95
-
96
- // Give the browser time to show the alert.
97
- await page.evaluate( () => new Promise( window.requestIdleCallback ) );
98
- expect( hasAlert ).toBe( false );
99
- } );
100
- } );
@@ -1,158 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import {
5
- createNewPost,
6
- clickOnMoreMenuItem,
7
- canvas,
8
- } from '@wordpress/e2e-test-utils';
9
-
10
- describe( 'New User Experience (NUX)', () => {
11
- it( 'should show the guide to first-time users', async () => {
12
- let welcomeGuideText, welcomeGuide;
13
-
14
- // Create a new post as a first-time user.
15
- await createNewPost( { showWelcomeGuide: true } );
16
-
17
- // Guide should be on page 1 of 4
18
- welcomeGuideText = await page.$eval(
19
- '.edit-post-welcome-guide',
20
- ( element ) => element.innerText
21
- );
22
- expect( welcomeGuideText ).toContain( 'Welcome to the block editor' );
23
-
24
- // Click on the 'Next' button.
25
- const [ nextButton ] = await page.$x(
26
- '//button[contains(text(), "Next")]'
27
- );
28
- await nextButton.click();
29
-
30
- // Guide should be on page 2 of 4
31
- welcomeGuideText = await page.$eval(
32
- '.edit-post-welcome-guide',
33
- ( element ) => element.innerText
34
- );
35
- expect( welcomeGuideText ).toContain( 'Make each block your own' );
36
-
37
- // Click on the 'Previous' button.
38
- const [ previousButton ] = await page.$x(
39
- '//button[contains(text(), "Previous")]'
40
- );
41
- await previousButton.click();
42
-
43
- // Guide should be on page 1 of 4
44
- welcomeGuideText = await page.$eval(
45
- '.edit-post-welcome-guide',
46
- ( element ) => element.innerText
47
- );
48
- expect( welcomeGuideText ).toContain( 'Welcome to the block editor' );
49
-
50
- // Press the button for Page 2.
51
- await page.click( 'button[aria-label="Page 2 of 4"]' );
52
- await page.waitForXPath(
53
- '//h1[contains(text(), "Make each block your own")]'
54
- );
55
- // This shouldn't be necessary
56
- // eslint-disable-next-line no-restricted-syntax
57
- await page.waitForTimeout( 500 );
58
-
59
- // Press the right arrow key for Page 3.
60
- await page.keyboard.press( 'ArrowRight' );
61
- await page.waitForXPath(
62
- '//h1[contains(text(), "Get to know the block library")]'
63
- );
64
-
65
- // Press the right arrow key for Page 4.
66
- await page.keyboard.press( 'ArrowRight' );
67
- await page.waitForXPath(
68
- '//h1[contains(text(), "Learn how to use the block editor")]'
69
- );
70
-
71
- // Click on the *visible* 'Get started' button. There are two in the DOM
72
- // but only one is shown depending on viewport size.
73
- let getStartedButton;
74
- for ( const buttonHandle of await page.$x(
75
- '//button[contains(text(), "Get started")]'
76
- ) ) {
77
- if (
78
- await page.evaluate(
79
- ( button ) => button.style.display !== 'none',
80
- buttonHandle
81
- )
82
- ) {
83
- getStartedButton = buttonHandle;
84
- }
85
- }
86
- await getStartedButton.click();
87
-
88
- // Guide should be closed
89
- welcomeGuide = await page.$( '.edit-post-welcome-guide' );
90
- expect( welcomeGuide ).toBeNull();
91
-
92
- // Reload the editor.
93
- await page.reload();
94
- await page.waitForSelector( '.edit-post-layout' );
95
-
96
- // Guide should be closed
97
- welcomeGuide = await page.$( '.edit-post-welcome-guide' );
98
- expect( welcomeGuide ).toBeNull();
99
- } );
100
-
101
- it( 'should not show the welcome guide again if it is dismissed', async () => {
102
- let welcomeGuide;
103
-
104
- // Create a new post as a first-time user.
105
- await createNewPost( { showWelcomeGuide: true } );
106
-
107
- // Guide should be open
108
- welcomeGuide = await page.$( '.edit-post-welcome-guide' );
109
- expect( welcomeGuide ).not.toBeNull();
110
-
111
- // Close the guide
112
- await page.click( '[role="dialog"] button[aria-label="Close"]' );
113
-
114
- // Reload the editor.
115
- await page.reload();
116
- await page.waitForSelector( '.edit-post-layout' );
117
-
118
- // Guide should be closed
119
- welcomeGuide = await page.$( '.edit-post-welcome-guide' );
120
- expect( welcomeGuide ).toBeNull();
121
- } );
122
-
123
- it( 'should focus post title field after welcome guide is dismissed and post is empty', async () => {
124
- // Create a new post as a first-time user.
125
- await createNewPost( { showWelcomeGuide: true } );
126
-
127
- // Guide should be open.
128
- const welcomeGuide = await page.$( '.edit-post-welcome-guide' );
129
- expect( welcomeGuide ).not.toBeNull();
130
-
131
- // Close the guide.
132
- await page.click( '[role="dialog"] button[aria-label="Close"]' );
133
-
134
- // Focus should be in post title field.
135
- const postTitle = await canvas().waitForSelector(
136
- 'h1[aria-label="Add title"'
137
- );
138
- await expect( postTitle ).toHaveFocus();
139
- } );
140
-
141
- it( 'should show the welcome guide if it is manually opened', async () => {
142
- let welcomeGuide;
143
-
144
- // Create a new post as a returning user.
145
- await createNewPost();
146
-
147
- // Guide should be closed
148
- welcomeGuide = await page.$( '.edit-post-welcome-guide' );
149
- expect( welcomeGuide ).toBeNull();
150
-
151
- // Manually open the guide
152
- await clickOnMoreMenuItem( 'Welcome Guide' );
153
-
154
- // Guide should be open
155
- welcomeGuide = await page.$( '.edit-post-welcome-guide' );
156
- expect( welcomeGuide ).not.toBeNull();
157
- } );
158
- } );
@@ -1,58 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { createNewPost } from '@wordpress/e2e-test-utils';
5
-
6
- describe( 'preferences', () => {
7
- beforeAll( async () => {
8
- await createNewPost();
9
- } );
10
-
11
- /**
12
- * Returns a promise which resolves to the text content of the active
13
- * editor sidebar tab, or null if there is no active sidebar tab (closed).
14
- *
15
- * @return {Promise} Promise resolving to active tab.
16
- */
17
- async function getActiveSidebarTabText() {
18
- try {
19
- return await page.$eval(
20
- '.edit-post-sidebar__panel-tab.is-active',
21
- ( node ) => node.textContent
22
- );
23
- } catch ( error ) {
24
- // page.$eval throws when it does not find the selector, which we
25
- // can intentionally intercept and consider as there being no
26
- // active sidebar tab (no sidebar).
27
- return null;
28
- }
29
- }
30
-
31
- it( 'remembers sidebar dismissal between sessions', async () => {
32
- // Open by default.
33
- expect( await getActiveSidebarTabText() ).toBe( 'Post' );
34
-
35
- // Change to "Block" tab.
36
- await page.click( '.edit-post-sidebar__panel-tab[aria-label="Block"]' );
37
- expect( await getActiveSidebarTabText() ).toBe( 'Block' );
38
-
39
- // Regression test: Reload resets to document tab.
40
- //
41
- // See: https://github.com/WordPress/gutenberg/issues/6377
42
- // See: https://github.com/WordPress/gutenberg/pull/8995
43
- await page.reload();
44
- await page.waitForSelector( '.edit-post-layout' );
45
- expect( await getActiveSidebarTabText() ).toBe( 'Post' );
46
-
47
- // Dismiss.
48
- await page.click(
49
- '.edit-post-sidebar__panel-tabs [aria-label="Close Settings"]'
50
- );
51
- expect( await getActiveSidebarTabText() ).toBe( null );
52
-
53
- // Remember after reload.
54
- await page.reload();
55
- await page.waitForSelector( '.edit-post-layout' );
56
- expect( await getActiveSidebarTabText() ).toBe( null );
57
- } );
58
- } );
@@ -1,82 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import {
5
- arePrePublishChecksEnabled,
6
- disablePrePublishChecks,
7
- enablePrePublishChecks,
8
- createNewPost,
9
- openPublishPanel,
10
- pressKeyWithModifier,
11
- publishPost,
12
- canvas,
13
- } from '@wordpress/e2e-test-utils';
14
-
15
- describe( 'PostPublishPanel', () => {
16
- let werePrePublishChecksEnabled;
17
- beforeEach( async () => {
18
- await createNewPost();
19
- werePrePublishChecksEnabled = await arePrePublishChecksEnabled();
20
- if ( ! werePrePublishChecksEnabled ) {
21
- await enablePrePublishChecks();
22
- }
23
- } );
24
-
25
- afterEach( async () => {
26
- if ( ! werePrePublishChecksEnabled ) {
27
- await disablePrePublishChecks();
28
- }
29
- } );
30
-
31
- it( 'PrePublish: publish button should have the focus', async () => {
32
- await canvas().type( '.editor-post-title__input', 'E2E Test Post' );
33
- await openPublishPanel();
34
-
35
- const focusedElementClassList = await page.$eval(
36
- ':focus',
37
- ( focusedElement ) => {
38
- return Object.values( focusedElement.classList );
39
- }
40
- );
41
- expect( focusedElementClassList ).toContain(
42
- 'editor-post-publish-button'
43
- );
44
- } );
45
-
46
- it( 'PostPublish: post link should have the focus', async () => {
47
- const postTitle = 'E2E Test Post';
48
- await canvas().type( '.editor-post-title__input', postTitle );
49
- await publishPost();
50
-
51
- const focusedElementTag = await page.$eval(
52
- ':focus',
53
- ( focusedElement ) => {
54
- return focusedElement.tagName.toLowerCase();
55
- }
56
- );
57
- const focusedElementText = await page.$eval(
58
- ':focus',
59
- ( focusedElement ) => {
60
- return focusedElement.text;
61
- }
62
- );
63
- expect( focusedElementTag ).toBe( 'a' );
64
- expect( focusedElementText ).toBe( postTitle );
65
- } );
66
-
67
- it( 'should retain focus within the panel', async () => {
68
- await canvas().type( '.editor-post-title__input', 'E2E Test Post' );
69
- await openPublishPanel();
70
- await pressKeyWithModifier( 'shift', 'Tab' );
71
-
72
- const focusedElementClassList = await page.$eval(
73
- ':focus',
74
- ( focusedElement ) => {
75
- return Object.values( focusedElement.classList );
76
- }
77
- );
78
- expect( focusedElementClassList ).toContain(
79
- 'components-checkbox-control__input'
80
- );
81
- } );
82
- } );