Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: upgrade Ariakit to latest #62947

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
eb40b5f
Upgrade Ariakit to latest.
DaniGuardiola Apr 23, 2024
19a95b2
Revert.
DaniGuardiola Apr 23, 2024
e3cfd44
Upgrade in the right package and upgrade "test' too.
DaniGuardiola Apr 23, 2024
430522f
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into u…
DaniGuardiola Jun 27, 2024
50258f0
Upgrade to latest.
DaniGuardiola Jul 1, 2024
79fa288
Pin on v0.3.13 for now.
DaniGuardiola Jul 2, 2024
179f374
Tweaks on two tests.
DaniGuardiola Jul 2, 2024
89f4f17
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into u…
DaniGuardiola Jul 2, 2024
cf493d7
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into u…
DaniGuardiola Jul 15, 2024
aebd132
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into u…
DaniGuardiola Jul 25, 2024
0c64d63
Replace render method with Ariakit's in custom select control (v1).
DaniGuardiola Jul 25, 2024
3be0bc2
Replace render method with Ariakit's in tabs.
DaniGuardiola Jul 25, 2024
68afa3c
Temporarily copy render utility to repo to experiment with it.
DaniGuardiola Jul 25, 2024
bac4026
Add rerender support to `render`.
DaniGuardiola Jul 25, 2024
11a2492
Updated Tabs tests to use new re-render API.
DaniGuardiola Jul 25, 2024
f8ada30
Revert manual fixes and fix one of the test files.
DaniGuardiola Jul 25, 2024
375c5ca
Fix test file by switching to Ariakit's render utility.
DaniGuardiola Jul 25, 2024
3e8fa49
Remove accidentally pushed code (oops).
DaniGuardiola Jul 25, 2024
f4f5cb9
Fix remaining custom-select-control (v1) tests.
DaniGuardiola Jul 25, 2024
38383d1
Fix remaining font-size-picker tests.
DaniGuardiola Jul 25, 2024
ba36ad0
Upgrade `@ariakit/test` to latest.
DaniGuardiola Jul 25, 2024
b6627b1
Upgrade to 0.3.14
DaniGuardiola Jul 25, 2024
7e7cb32
Upgrade to 0.4.0
DaniGuardiola Jul 25, 2024
49a959f
Fix CustomSelectControl tests
tyxla Jul 26, 2024
4c022ed
Revert "Fix CustomSelectControl tests"
DaniGuardiola Jul 26, 2024
30a8c1f
Added TODO notes to Tooltip tests.
DaniGuardiola Jul 26, 2024
1637baa
Added TODO notes to CustomSelectControl v2 tests and styles.
DaniGuardiola Jul 26, 2024
28307fe
Added TODO notes to ToggleGroupControl tests.
DaniGuardiola Jul 26, 2024
ee85f1a
Added TODO notes to DropdownMenu v2 tests and styles.
DaniGuardiola Jul 26, 2024
246c6dd
Added TODO notes to CustomSelectControl tests.
DaniGuardiola Jul 26, 2024
114badd
Added TODO notes to Composite (legacy) tests.
DaniGuardiola Jul 26, 2024
6679cc6
Fixed all issues and updated snapshots.
DaniGuardiola Jul 26, 2024
d2e08e3
Upgrade to 0.4.1
DaniGuardiola Jul 26, 2024
31ad777
Undo temporary hack.
DaniGuardiola Jul 26, 2024
bbfb8b1
Upgrade to 0.4.2
DaniGuardiola Jul 26, 2024
2355a34
Upgrade to 0.4.3
DaniGuardiola Jul 26, 2024
91b4b66
Upgrade to 0.4.4
DaniGuardiola Jul 26, 2024
d1aab2c
Upgrade to 0.4.5
DaniGuardiola Jul 26, 2024
6ed775d
Upgrade to 0.4.6
DaniGuardiola Jul 26, 2024
3e90c1b
Temporarily revert all deps changes
DaniGuardiola Jul 26, 2024
bbd1f11
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into u…
DaniGuardiola Jul 26, 2024
157479d
Restore from latest trunk
DaniGuardiola Jul 26, 2024
c32b9a0
Upgrade to 0.4.7 (and 0.3.16 for ariakit/test) cleanly
DaniGuardiola Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/components/src/composite/legacy/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@
const activeButton = queryByAttribute(
'data-active-item',
view.baseElement,
// TODO: ariakit-0-4 - this is a problem due to https://ariakit.org/changelog#public-data-attributes-have-now-boolean-values
// to fix all tests, simply replace '' -> 'true' below
''
);
expect( activeButton ).not.toBeNull();

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With \"spread\" state Includes focusable disabled items" id="composite-2" > <button data-active-item="true" data-focus-visible="true" id="composite-2-1" type="button" > Item 1 </button> <button aria-disabled="true" id="composite-2-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-2-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <button> Before </button> <div aria-label="With `state` prop Renders as a single tab stop" id="composite-3" > <button data-active-item="true" data-focus-visible="true" id="composite-3-1" type="button" > Item 1 </button> <button id="composite-3-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-3-3" tabindex="-1" type="button" > Item 3 </button> </div> <button> After </button> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Excludes disabled items" id="composite-4" > <button data-active-item="true" id="composite-4-1" type="button" > Item 1 </button> <button aria-disabled="true" disabled="" id="composite-4-2" style="pointer-events: none;" type="button" > Item 2 </button> <button id="composite-4-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Includes focusable disabled items" id="composite-5" > <button data-active-item="true" id="composite-5-1" type="button" > Item 1 </button> <button aria-disabled="true" id="composite-5-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-5-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Includes focusable disabled items" id="composite-5" > <button data-active-item="true" id="composite-5-1" type="button" > Item 1 </button> <button aria-disabled="true" id="composite-5-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-5-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Includes focusable disabled items" id="composite-5" > <button id="composite-5-1" tabindex="-1" type="button" > Item 1 </button> <button aria-disabled="true" data-active-item="true" data-focus-visible="true" id="composite-5-2" type="button" > Item 2 </button> <button id="composite-5-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button id="composite-6-2" tabindex="-1" type="button" > Item 2 </button> <button data-active-item="true" data-focus-visible="true" id="composite-6-3" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button data-active-item="true" id="composite-6-1" type="button" > Item 1 </button> <button id="composite-6-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-6-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5 at runNextTicks (node:internal/process/task_queues:60:5) at processTimers (node:internal/timers:516:9)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button data-active-item="true" data-focus-visible="true" id="composite-6-2" type="button" > Item 2 </button> <button id="composite-6-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button data-active-item="true" data-focus-visible="true" id="composite-6-2" type="button" > Item 2 </button> <button id="composite-6-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With \"spread\" state Includes focusable disabled items" id="composite-2" > <button data-active-item="true" data-focus-visible="true" id="composite-2-1" type="button" > Item 1 </button> <button aria-disabled="true" id="composite-2-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-2-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5 at runNextTicks (node:internal/process/task_queues:60:5) at listOnTimeout (node:internal/timers:545:9) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <button> Before </button> <div aria-label="With `state` prop Renders as a single tab stop" id="composite-3" > <button data-active-item="true" data-focus-visible="true" id="composite-3-1" type="button" > Item 1 </button> <button id="composite-3-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-3-3" tabindex="-1" type="button" > Item 3 </button> </div> <button> After </button> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <button> Before </button> <div aria-label="With `state` prop Renders as a single tab stop" id="composite-3" > <button data-active-item="true" data-focus-visible="true" id="composite-3-1" type="button" > Item 1 </button> <button id="composite-3-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-3-3" tabindex="-1" type="button" > Item 3 </button> </div> <button> After </button> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5 at runNextTicks (node:internal/process/task_queues:60:5) at processTimers (node:internal/timers:516:9)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Excludes disabled items" id="composite-4" > <button id="composite-4-1" tabindex="-1" type="button" > Item 1 </button> <button aria-disabled="true" disabled="" id="composite-4-2" style="pointer-events: none;" type="button" > Item 2 </button> <button data-active-item="true" data-focus-visible="true" id="composite-4-3" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5 at runNextTicks (node:internal/process/task_queues:60:5) at processTimers (node:internal/timers:516:9)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Includes focusable disabled items" id="composite-5" > <button id="composite-5-1" type="button" > Item 1 </button> <button aria-disabled="true" id="composite-5-2" type="button" > Item 2 </button> <button id="composite-5-3" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="With `state` prop Includes focusable disabled items" id="composite-5" > <button data-active-item="true" data-focus-visible="true" id="composite-5-1" type="button" > Item 1 </button> <button aria-disabled="true" id="composite-5-2" tabindex="-1" type="button" > Item 2 </button> <button id="composite-5-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button id="composite-6-2" tabindex="-1" type="button" > Item 2 </button> <button data-active-item="true" data-focus-visible="true" id="composite-6-3" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button data-active-item="true" data-focus-visible="true" id="composite-6-2" type="button" > Item 2 </button> <button id="composite-6-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at Timeout.task [as _onTimeout] (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/browser/Window.js:553:19) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button data-active-item="true" id="composite-6-2" type="button" > Item 2 </button> <button id="composite-6-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5

Check failure on line 54 in packages/components/src/composite/legacy/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 2/4

Error: expect(received).not.toBeNull() Received: null Ignored nodes: comments, script, style <html> <head /> <body> <div> <div aria-label="When LTR In one dimension All directions work with no orientation" id="composite-6" > <button id="composite-6-1" tabindex="-1" type="button" > Item 1 </button> <button data-active-item="true" id="composite-6-2" type="button" > Item 2 </button> <button id="composite-6-3" tabindex="-1" type="button" > Item 3 </button> </div> </div> </body> </html> at toBeNull (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:54:30) at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:47:12) at checkCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:121:77) at MutationObserver.checkRealTimersCallback (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/wait-for.js:115:16) at MutationObserver.invokeTheCallbackFunction (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js:19:26) at notifyMutationObservers (/home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:160:22) at /home/runner/work/gutenberg/gutenberg/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js:133:5
} );
return view;
}
Expand Down
10 changes: 10 additions & 0 deletions packages/components/src/custom-select-control-v2/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ export const SelectPopover = styled( Ariakit.SelectPopover )`
animation-duration: 0s;
}

// TODO: ariakit-0-4 - now animation is enabled by default, and since there's no exit animation this section should be replaced by the styles below:
// &[data-open] {
// @media not ( prefers-reduced-motion ) {
// animation-duration: ${ ANIMATION_PARAMS.DURATION };
// animation-timing-function: ${ ANIMATION_PARAMS.EASING };
// animation-name: ${ slideDownAndFade };
// will-change: transform, opacity;
// }
// }

&[data-focus-visible] {
/* The outline will be on the trigger, rather than the popover. */
outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@
).toBeVisible();

await press.Escape();
// TODO: ariakit-0-4 - the failure below is due to the animation change which leaves the popover open for a bit after closing, see note in the styles.ts file
// it also helps to open the storybook with 0.4.0 installed and seeing it in the browser, direct link: http://localhost:50240/iframe.html?args=&id=components-customselectcontrol-v2--default&viewMode=story
expect(
screen.queryByRole( 'listbox', {
name: defaultProps.label,
} )
).not.toBeInTheDocument();

Check failure on line 120 in packages/components/src/custom-select-control-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 4/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":rn:" aria-labelledby=":rj:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":rk:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":rn:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":rq:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":rt:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r10:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r13:" role="option" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control-v2/test/index.tsx:120:9)

Check failure on line 120 in packages/components/src/custom-select-control-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 4/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":r6v:" aria-labelledby=":r6r:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":r6s:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":r6v:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r72:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r75:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r78:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r7b:" role="option" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control-v2/test/index.tsx:120:9)

Check failure on line 120 in packages/components/src/custom-select-control-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 4/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":rn:" aria-labelledby=":rj:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":rk:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":rn:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":rq:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":rt:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r10:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r13:" role="option" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control-v2/test/index.tsx:120:9)

Check failure on line 120 in packages/components/src/custom-select-control-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 4/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":r6v:" aria-labelledby=":r6r:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":r6s:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":r6v:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r72:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r75:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r78:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="css-1kwageb-SelectItem-SelectItem e1p3eej75" id=":r7b:" role="option" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control-v2/test/index.tsx:120:9)

expect( currentSelectedItem ).toHaveTextContent( items[ 0 ].value );
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,13 @@
).toBeVisible();

await press.Escape();
// TODO: ariakit-0-4 - since this version depends on v2 for styles, the same test failure happens here for the same reason
// see note in the v2 tests, fixing that will also fix this
expect(
screen.queryByRole( 'listbox', {
name: props.label,
} )
).not.toBeInTheDocument();

Check failure on line 215 in packages/components/src/custom-select-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 1/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":r2s:" aria-labelledby=":r2o:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":r2p:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":r2s:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r2v:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r32:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r35:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r38:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r3b:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">tomato (with custom props)<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control/test/index.tsx:215:9)

Check failure on line 215 in packages/components/src/custom-select-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 1/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":rgj:" aria-labelledby=":rgf:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":rgg:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":rgj:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgm:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgp:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgs:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgv:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rh2:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">tomato (with custom props)<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control/test/index.tsx:215:9)

Check failure on line 215 in packages/components/src/custom-select-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 1/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":r2s:" aria-labelledby=":r2o:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":r2p:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":r2s:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r2v:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r32:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r35:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r38:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":r3b:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">tomato (with custom props)<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control/test/index.tsx:215:9)

Check failure on line 215 in packages/components/src/custom-select-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 1/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-activedescendant=":rgj:" aria-labelledby=":rgf:" class="css-1oaeffl-SelectPopover e1p3eej76" data-dialog="" data-leave="true" id=":rgg:" role="listbox" style="position: relative;" tabindex="0"><div aria-selected="true" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" data-active-item="true" data-autofocus="true" id=":rgj:" role="option" tabindex="-1">violets<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;"><svg aria-hidden="true" focusable="false" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z" /></svg></span></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgm:" role="option" tabindex="-1">crimson clover<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgp:" role="option" tabindex="-1">poppy<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgs:" role="option" tabindex="-1">amber<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rgv:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">aquamarine<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div><div aria-selected="false" class="amber-skies components-custom-select-control__item css-qcbu9p-SelectItem-SelectItem e1p3eej75" id=":rh2:" role="option" style="background-color: rgb(127, 255, 212); rotate: 13deg;" tabindex="-1">tomato (with custom props)<span aria-hidden="true" class="css-m3n9st-SelectedItemCheck e1p3eej70" style="width: 1em; height: 1em; pointer-events: none;" /></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/custom-select-control/test/index.tsx:215:9)

expect( currentSelectedItem ).toHaveTextContent(
props.options[ 0 ].name
Expand Down
21 changes: 21 additions & 0 deletions packages/components/src/dropdown-menu-v2/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,27 @@ export const DropdownMenu = styled( Ariakit.Menu )<
@media ( prefers-reduced-motion ) {
animation-duration: 0s;
}

// TODO: ariakit-0-4 - now animation is enabled by default, and since there's no exit animation this section should be replaced by the styles below:
// &[data-open] {
// @media not ( prefers-reduced-motion ) {
// animation-duration: ${ ANIMATION_PARAMS.DURATION };
// animation-timing-function: ${ ANIMATION_PARAMS.EASING };
// will-change: transform, opacity;
// /* Default animation.*/
// animation-name: ${ slideDownAndFade };

// &[data-side='left'] {
// animation-name: ${ slideLeftAndFade };
// }
// &[data-side='up'] {
// animation-name: ${ slideUpAndFade };
// }
// &[data-side='right'] {
// animation-name: ${ slideRightAndFade };
// }
// }
}
`;

const baseItem = css`
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/dropdown-menu-v2/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
// Pressing esc will close the menu and move focus to the toggle
await press.Escape();

expect( screen.queryByRole( 'menu' ) ).not.toBeInTheDocument();

Check failure on line 199 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r1e:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r1f:" role="menu" style="position: relative;" tabindex="0"><button style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;" tabindex="-1" type="button">Dismiss popup</button><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r1j:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:199:47)

Check failure on line 199 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r1e:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r1f:" role="menu" style="position: relative;" tabindex="0"><button style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;" tabindex="-1" type="button">Dismiss popup</button><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r1j:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:199:47)

await waitFor( () =>
expect(
Expand All @@ -220,7 +220,7 @@
// Click on the body (ie. outside of the dropdown menu)
await click( document.body );

expect( screen.queryByRole( 'menu' ) ).not.toBeInTheDocument();

Check failure on line 223 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r1l:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r1m:" role="menu" style="position: relative;" tabindex="0"><button style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;" tabindex="-1" type="button">Dismiss popup</button><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r1q:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:223:47)

Check failure on line 223 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r1l:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r1m:" role="menu" style="position: relative;" tabindex="0"><button style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;" tabindex="-1" type="button">Dismiss popup</button><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r1q:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:223:47)
} );

it( 'should close when clicking on a menu item', async () => {
Expand All @@ -238,7 +238,7 @@
// Clicking a menu item will close the menu
await click( screen.getByRole( 'menuitem' ) );

expect( screen.queryByRole( 'menu' ) ).not.toBeInTheDocument();

Check failure on line 241 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r1s:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r1t:" role="menu" style="position: relative;" tabindex="0"><button style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;" tabindex="-1" type="button">Dismiss popup</button><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r21:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:241:47)

Check failure on line 241 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r1s:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r1t:" role="menu" style="position: relative;" tabindex="0"><button style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;" tabindex="-1" type="button">Dismiss popup</button><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r21:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:241:47)
} );

it( 'should not close when clicking on a menu item when the `hideOnClick` prop is set to `false`', async () => {
Expand Down Expand Up @@ -918,7 +918,9 @@
await sleep();
await press.Tab();
expect( outerButton ).toBeInTheDocument();
// TODO: ariakit-0-4 - the failure below is due to the animation change which leaves the popover open for a bit after closing, see note in the styles.ts file
// it also helps to open the storybook with 0.4.0 installed and seeing it in the browser, direct link: http://localhost:50240/iframe.html?args=&id=components-experimental-dropdownmenu-v2--default&viewMode=story
expect( screen.queryByRole( 'menu' ) ).not.toBeInTheDocument();

Check failure on line 923 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r5i:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r5j:" role="menu" style="position: relative;" tabindex="0"><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r5m:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:923:47)

Check failure on line 923 in packages/components/src/dropdown-menu-v2/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 3/4

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div aria-labelledby=":r5i:" aria-orientation="vertical" class="components-dropdown-menu css-42uq7r-DropdownMenu-DropdownMenu e1kdzosf12" data-dialog="" data-leave="true" data-side="bottom" data-wp-c16t="true" data-wp-component="DropdownMenu" id=":r5j:" role="menu" style="position: relative;" tabindex="0"><div class="css-lgq169-DropdownMenuItem-baseItem e1kdzosf11" id=":r5m:" role="menuitem" tabindex="-1"><span class="css-1qky3c4-ItemPrefixWrapper e1kdzosf8" /><div class="css-1n5s300-DropdownMenuItemContentWrapper e1kdzosf7"><div class="css-1q72f1g-DropdownMenuItemChildrenWrapper e1kdzosf6">Dropdown menu item</div></div></div></div> instead at Object.toBeInTheDocument (/home/runner/work/gutenberg/gutenberg/packages/components/src/dropdown-menu-v2/test/index.tsx:923:47)
} );
} );

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/toggle-group-control/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
expect( container ).toMatchSnapshot();
} );

// TODO: ariakit-0-4 - snapshots fail simply because of the change from data-active-item="true" to data-active-item="", which does not affect anything else
// we just need to update the snapshots
it( 'with icons', () => {
const { container } = render(
<Component value="uppercase" label="Test Toggle Group Control">
Expand All @@ -121,7 +123,7 @@
</Component>
);

expect( container ).toMatchSnapshot();

Check failure on line 126 in packages/components/src/toggle-group-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 4/4

Error: expect(received).toMatchSnapshot() Snapshot name: `ToggleGroupControl uncontrolled should render correctly with icons 1` - Snapshot - 1 + Received + 1 @@ -253,11 +253,11 @@ > <button aria-checked="true" aria-label="Uppercase" class="emotion-12 components-toggle-group-control-option-base" - data-active-item="" + data-active-item="true" data-value="uppercase" data-wp-c16t="true" data-wp-component="ToggleGroupControlOptionBase" id="toggle-group-control-as-radio-group-1-2" role="radio" at Object.toMatchSnapshot (/home/runner/work/gutenberg/gutenberg/packages/components/src/toggle-group-control/test/index.tsx:126:24) at Promise.then.completed (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:300:28) at new Promise (<anonymous>) at callAsyncCircusFn (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:233:10) at _callCircusTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:315:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:251:3) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:125:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at run (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:70:3) at runAndTransformResultsToJestFormat (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/testWorker.js:106:12)

Check failure on line 126 in packages/components/src/toggle-group-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 4/4

Error: expect(received).toMatchSnapshot() Snapshot name: `ToggleGroupControl controlled should render correctly with icons 1` - Snapshot - 1 + Received + 1 @@ -253,11 +253,11 @@ > <button aria-checked="true" aria-label="Uppercase" class="emotion-12 components-toggle-group-control-option-base" - data-active-item="" + data-active-item="true" data-value="uppercase" data-wp-c16t="true" data-wp-component="ToggleGroupControlOptionBase" id="toggle-group-control-as-radio-group-11-30" role="radio" at Object.toMatchSnapshot (/home/runner/work/gutenberg/gutenberg/packages/components/src/toggle-group-control/test/index.tsx:126:24) at Promise.then.completed (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:300:28) at new Promise (<anonymous>) at callAsyncCircusFn (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:233:10) at _callCircusTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:315:40) at _runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:251:3) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:125:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at run (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:70:3) at runAndTransformResultsToJestFormat (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/testWorker.js:106:12)

Check failure on line 126 in packages/components/src/toggle-group-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 4/4

Error: expect(received).toMatchSnapshot() Snapshot name: `ToggleGroupControl uncontrolled should render correctly with icons 1` - Snapshot - 1 + Received + 1 @@ -253,11 +253,11 @@ > <button aria-checked="true" aria-label="Uppercase" class="emotion-12 components-toggle-group-control-option-base" - data-active-item="" + data-active-item="true" data-value="uppercase" data-wp-c16t="true" data-wp-component="ToggleGroupControlOptionBase" id="toggle-group-control-as-radio-group-1-2" role="radio" at Object.toMatchSnapshot (/home/runner/work/gutenberg/gutenberg/packages/components/src/toggle-group-control/test/index.tsx:126:24) at Promise.then.completed (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:300:28) at new Promise (<anonymous>) at callAsyncCircusFn (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:233:10) at _callCircusTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:315:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:251:3) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:125:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at run (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:70:3) at runAndTransformResultsToJestFormat (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/testWorker.js:106:12)

Check failure on line 126 in packages/components/src/toggle-group-control/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 4/4

Error: expect(received).toMatchSnapshot() Snapshot name: `ToggleGroupControl controlled should render correctly with icons 1` - Snapshot - 1 + Received + 1 @@ -253,11 +253,11 @@ > <button aria-checked="true" aria-label="Uppercase" class="emotion-12 components-toggle-group-control-option-base" - data-active-item="" + data-active-item="true" data-value="uppercase" data-wp-c16t="true" data-wp-component="ToggleGroupControlOptionBase" id="toggle-group-control-as-radio-group-11-30" role="radio" at Object.toMatchSnapshot (/home/runner/work/gutenberg/gutenberg/packages/components/src/toggle-group-control/test/index.tsx:126:24) at Promise.then.completed (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:300:28) at new Promise (<anonymous>) at callAsyncCircusFn (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/utils.js:233:10) at _callCircusTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:315:40) at _runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:251:3) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:125:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at _runTestsForDescribeBlock (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:120:9) at run (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:70:3) at runAndTransformResultsToJestFormat (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/home/runner/work/gutenberg/gutenberg/node_modules/jest-runner/build/testWorker.js:106:12)
} );
} );
it( 'should render with the correct option initially selected when `value` is defined', () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/tooltip/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
await waitFor( expectTooltipToBeVisible, { timeout } );

const waitExpectTooltipToHide = async () =>
await waitFor( expectTooltipToBeHidden );

Check failure on line 37 in packages/components/src/tooltip/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 22) 3/4

TestingLibraryElementError: Unable to find an accessible element with the role "button" and description "Outer tooltip" Here are the accessible roles: button: Name "Tooltip anchor": Description "": <button /> --------------------------------------------------tooltip: Name "Outer tooltip": Description "": <div class="components-tooltip" data-dialog="" data-enter="true" data-open="true" id="tooltip-16" role="tooltip" style="position: relative;" tabindex="-1" /> -------------------------------------------------- Ignored nodes: comments, script, style <body class="" > <div> <button> Tooltip anchor </button> </div> <div id="portal/tooltip-16" > <div style="position: absolute; top: 0px; left: 0px; --popover-overflow-padding: 0.5px; --popover-anchor-width: 0px; --popover-available-width: -1px; --popover-available-height: -5px; transform: translate3d(0px,4px,0);" > <div class="components-tooltip" data-dialog="" data-enter="true" data-open="true" id="tooltip-16" role="tooltip" style="position: relative;" tabindex="-1" > Outer tooltip </div> </div> </div> </body> at Object.getElementError (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:37:19) at /home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/query-helpers.js:76:38 at /home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/query-helpers.js:52:17 at /home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/query-helpers.js:95:19 at Object.getByRole (/home/runner/work/gutenberg/gutenberg/packages/components/src/tooltip/test/index.tsx:499:12)

Check failure on line 37 in packages/components/src/tooltip/test/index.tsx

View workflow job for this annotation

GitHub Actions / JavaScript (Node.js 20) 3/4

TestingLibraryElementError: Unable to find an accessible element with the role "button" and description "Outer tooltip" Here are the accessible roles: button: Name "Tooltip anchor": Description "": <button /> --------------------------------------------------tooltip: Name "Outer tooltip": Description "": <div class="components-tooltip" data-dialog="" data-enter="true" data-open="true" id="tooltip-16" role="tooltip" style="position: relative;" tabindex="-1" /> -------------------------------------------------- Ignored nodes: comments, script, style <body class="" > <div> <button> Tooltip anchor </button> </div> <div id="portal/tooltip-16" > <div style="position: absolute; top: 0px; left: 0px; --popover-overflow-padding: 0.5px; --popover-anchor-width: 0px; --popover-available-width: -1px; --popover-available-height: -5px; transform: translate3d(0px,4px,0);" > <div class="components-tooltip" data-dialog="" data-enter="true" data-open="true" id="tooltip-16" role="tooltip" style="position: relative;" tabindex="-1" > Outer tooltip </div> </div> </div> </body> at Object.getElementError (/home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/config.js:37:19) at /home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/query-helpers.js:76:38 at /home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/query-helpers.js:52:17 at /home/runner/work/gutenberg/gutenberg/node_modules/@testing-library/dom/dist/query-helpers.js:95:19 at Object.getByRole (/home/runner/work/gutenberg/gutenberg/packages/components/src/tooltip/test/index.tsx:499:12)

const hoverOutside = async () => {
await hover( document.body );
Expand Down Expand Up @@ -65,6 +65,7 @@
expectTooltipToBeHidden();
} );

// TODO: ariakit-0-4 - probably want to remove this test since ariakit doesn't support tooltip as description anymore and it's just not a good idea in general to rely on that behavior (see description: https://github.com/WordPress/gutenberg/pull/62947)
it( 'should associate the tooltip text with its anchor via the accessible description when visible', async () => {
render( <Tooltip { ...props } /> );

Expand Down Expand Up @@ -493,6 +494,7 @@
expect(
screen.queryByRole( 'tooltip', { name: 'Inner tooltip' } )
).not.toBeInTheDocument();
// TODO: ariakit-0-4 - need to remove the assertion below since ariakit doesn't support tooltip as description anymore (see description: https://github.com/WordPress/gutenberg/pull/62947)
expect(
screen.getByRole( 'button', {
description: 'Outer tooltip',
Expand Down
Loading