Components: upgrade Ariakit to latest #102453
Annotations
10 errors and 2 warnings
Running the tests:
packages/components/src/button/test/index.tsx#L37
TestingLibraryElementError: Unable to find an element with the text: WordPress. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<button
aria-label="WordPress"
class="components-button has-icon"
type="button"
>
<div
data-testid="test-icon"
/>
</button>
</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.getByText (/home/runner/work/gutenberg/gutenberg/packages/components/src/button/test/index.tsx:318:19)
|
Running the tests:
packages/components/src/button/test/index.tsx#L37
TestingLibraryElementError: Unable to find an element with the text: Label. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<button
aria-describedby="components-button__description-25"
aria-label="Label"
class="components-button has-icon"
type="button"
>
<div
data-testid="test-icon"
/>
</button>
<div
class="components-visually-hidden css-1mm2cvy-View e19lxcc00"
data-wp-c16t="true"
data-wp-component="VisuallyHidden"
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
>
<span
id="components-button__description-25"
>
Description text
</span>
</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.getByText (/home/runner/work/gutenberg/gutenberg/packages/components/src/button/test/index.tsx:355:19)
|
Running the tests:
packages/components/src/dropdown-menu-v2/test/index.tsx#L194
Error: expect(element).not.toBeInTheDocument()
expected document not to contain element, found <div aria-labelledby=":r1e:" aria-orientation="vertical" class="components-dropdown-menu css-xro5l5-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:194:47)
|
Running the tests:
packages/components/src/dropdown-menu-v2/test/index.tsx#L218
Error: expect(element).not.toBeInTheDocument()
expected document not to contain element, found <div aria-labelledby=":r1l:" aria-orientation="vertical" class="components-dropdown-menu css-xro5l5-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:218:47)
|
Running the tests:
packages/components/src/dropdown-menu-v2/test/index.tsx#L236
Error: expect(element).not.toBeInTheDocument()
expected document not to contain element, found <div aria-labelledby=":r1s:" aria-orientation="vertical" class="components-dropdown-menu css-xro5l5-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:236:47)
|
Running the tests:
packages/components/src/dropdown-menu-v2/test/index.tsx#L916
Error: expect(element).not.toBeInTheDocument()
expected document not to contain element, found <div aria-labelledby=":r5i:" aria-orientation="vertical" class="components-dropdown-menu css-xro5l5-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:916:47)
|
Running the tests:
packages/components/src/composite/legacy/test/index.tsx#L52
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"
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:52: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:573:17)
at processTimers (node:internal/timers:514:7)
|
Running the tests:
packages/components/src/composite/legacy/test/index.tsx#L19
Error: expect(jest.fn()).not.toHaveErrored(expected)
Expected mock function not to be called but it was called with:
["Warning: An update to %s inside a test was not wrapped in act(...).·
When testing, code that causes React state updates should be wrapped into act(...):·
act(() => {
/* fire events that update state */
});
/* assert on the output */·
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act%s", "CompositeItem2", "
at /home/runner/work/gutenberg/gutenberg/packages/components/node_modules/@ariakit/react-core/cjs/__chunks/R2YVMKBR.cjs:19:49
at mapLegacyStatePropsToComponentProps (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/index.tsx:123:4)
at div
at ContextProvider
at ContextProvider
at /home/runner/work/gutenberg/gutenberg/packages/components/node_modules/@ariakit/react-core/cjs/__chunks/R2YVMKBR.cjs:19:49
at mapLegacyStatePropsToComponentProps (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/index.tsx:123:4)
at useProps (/home/runner/work/gutenberg/gutenberg/packages/components/src/composite/legacy/test/index.tsx:226:18)"]
console.error() should not be used unless explicitly expected
See https://www.npmjs.com/package/@wordpress/jest-console for details.
at Object.assertExpectedCalls (/home/runner/work/gutenberg/gutenberg/packages/jest-console/src/index.js:32:40)
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 _callCircusHook (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:280:40)
at _runTest (/home/runner/work/gutenberg/gutenberg/node_modules/jest-circus/build/run.js:253:5)
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 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)
|
Running the tests:
packages/components/src/composite/legacy/test/index.tsx#L52
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"
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:52: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:573:17)
at processTimers (node:internal/timers:514:7)
|
Running the tests:
packages/components/src/composite/legacy/test/index.tsx#L52
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:52: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:573:17)
at processTimers (node:internal/timers:514:7)
|
Setup Node.js and install dependencies
Both node-version and node-version-file inputs are specified, only node-version will be used
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c, actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Loading