Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
update tests
  • Loading branch information
scruffian committed Oct 1, 2025
commit 17a86357de914a628241a4c07c709c96b9fc38d2
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
page: 'Page',
post_tag: 'Tag',
category: 'Category',
attachment: 'Attachment',

Check failure on line 37 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "Save" Here are the accessible roles: combobox: Name "Search or type URL": <input aria-autocomplete="list" aria-expanded="false" aria-owns="block-editor-url-input-suggestions-41" class="components-input-control__input css-s9wzhs-Input-dragStyles-fontSizeStyles-sizeStyles-customPaddings em5sgkm3" id="url-input-control-41" placeholder="Search or type URL" required="" role="combobox" type="text" value="?p=2" /> -------------------------------------------------- button: Name "Advanced": <button aria-controls="link-control-settings-drawer-10" aria-expanded="false" class="components-button block-editor-link-control__drawer-toggle is-next-40px-default-size has-text has-icon" type="button" /> Name "Cancel": <button class="components-button is-next-40px-default-size is-tertiary" type="button" /> Name "Apply": <button aria-disabled="true" class="components-button block-editor-link-control__search-submit is-next-40px-default-size is-primary" type="button" /> -------------------------------------------------- Ignored nodes: comments, script, style <body> <p class="a11y-speak-intro-text" id="a11y-speak-intro-text" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" > Notifications </p> <div aria-atomic="true" aria-live="assertive" aria-relevant="additions text" class="a11y-speak-region" id="a11y-speak-assertive" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" > No results. </div> <div aria-atomic="true" aria-live="polite" aria-relevant="additions text" class="a11y-speak-region" id="a11y-speak-polite" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" /> <div> <div class="block-editor-link-control" tabindex="-1" > <div class="block-editor-link-control__search-input-wrapper has-actions" > <div class="block-editor-link-control__search-input-container" > <div class="components-base-control block-editor-url-input block-editor-link-control__field block-editor-link-control__search-input css-ij2po-Wrapper-boxSizingReset ej5x27r4" > <div class="components-base-control__field css-yj91it-StyledField ej5x27r3" > <label class="components-visually-hidden css-161q9d5-PolymorphicDiv e19lxcc00" data-wp-c16t="true" data-wp-component="VisuallyHidden"

Check failure on line 37 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "Save" Here are the accessible roles: combobox: Name "Search or type URL": <input aria-autocomplete="list" aria-expanded="false" aria-owns="block-editor-url-input-suggestions-41" class="components-input-control__input css-s9wzhs-Input-dragStyles-fontSizeStyles-sizeStyles-customPaddings em5sgkm3" id="url-input-control-41" placeholder="Search or type URL" required="" role="combobox" type="text" value="?p=2" /> -------------------------------------------------- button: Name "Advanced": <button aria-controls="link-control-settings-drawer-10" aria-expanded="false" class="components-button block-editor-link-control__drawer-toggle is-next-40px-default-size has-text has-icon" type="button" /> Name "Cancel": <button class="components-button is-next-40px-default-size is-tertiary" type="button" /> Name "Apply": <button aria-disabled="true" class="components-button block-editor-link-control__search-submit is-next-40px-default-size is-primary" type="button" /> -------------------------------------------------- Ignored nodes: comments, script, style <body> <p class="a11y-speak-intro-text" id="a11y-speak-intro-text" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" > Notifications </p> <div aria-atomic="true" aria-live="assertive" aria-relevant="additions text" class="a11y-speak-region" id="a11y-speak-assertive" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" > No results. </div> <div aria-atomic="true" aria-live="polite" aria-relevant="additions text" class="a11y-speak-region" id="a11y-speak-polite" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" /> <div> <div class="block-editor-link-control" tabindex="-1" > <div class="block-editor-link-control__search-input-wrapper has-actions" > <div class="block-editor-link-control__search-input-container" > <div class="components-base-control block-editor-url-input block-editor-link-control__field block-editor-link-control__search-input css-ij2po-Wrapper-boxSizingReset ej5x27r4" > <div class="components-base-control__field css-yj91it-StyledField ej5x27r3" > <label class="components-visually-hidden css-161q9d5-PolymorphicDiv e19lxcc00" data-wp-c16t="true" data-wp-component="VisuallyHidden"

Check failure on line 37 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

TestingLibraryElementError: Unable to find an accessible element with the role "button" and name "Save" Here are the accessible roles: combobox: Name "Search or type URL": <input aria-autocomplete="list" aria-expanded="false" aria-owns="block-editor-url-input-suggestions-41" class="components-input-control__input css-s9wzhs-Input-dragStyles-fontSizeStyles-sizeStyles-customPaddings em5sgkm3" id="url-input-control-41" placeholder="Search or type URL" required="" role="combobox" type="text" value="?p=2" /> -------------------------------------------------- button: Name "Advanced": <button aria-controls="link-control-settings-drawer-10" aria-expanded="false" class="components-button block-editor-link-control__drawer-toggle is-next-40px-default-size has-text has-icon" type="button" /> Name "Cancel": <button class="components-button is-next-40px-default-size is-tertiary" type="button" /> Name "Apply": <button aria-disabled="true" class="components-button block-editor-link-control__search-submit is-next-40px-default-size is-primary" type="button" /> -------------------------------------------------- Ignored nodes: comments, script, style <body> <p class="a11y-speak-intro-text" id="a11y-speak-intro-text" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" > Notifications </p> <div aria-atomic="true" aria-live="assertive" aria-relevant="additions text" class="a11y-speak-region" id="a11y-speak-assertive" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" > 4 results found, use up and down arrow keys to navigate. </div> <div aria-atomic="true" aria-live="polite" aria-relevant="additions text" class="a11y-speak-region" id="a11y-speak-polite" style="position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;" /> <div> <div class="block-editor-link-control" tabindex="-1" > <div class="block-editor-link-control__search-input-wrapper has-actions" > <div class="block-editor-link-control__search-input-container" > <div class="components-base-control block-editor-url-input block-editor-link-control__field block-editor-link-control__search-input css-ij2po-Wrapper-boxSizingReset ej5x27r4" > <div class="components-base-control__field css-yj91it-StyledField ej5x27r3" > <label class="components-visually-hidden css-161q9d5-PolymorphicDiv e19lxcc00" data-wp-c16t="true" �[33
};

return builtInLabels[ type ] || type;
Expand Down Expand Up @@ -322,7 +322,7 @@

it( 'true', () => {
render(
<LinkControl

Check failure on line 325 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

Error: expect(received).toHaveAttribute() received value must be an HTMLElement or an SVGElement. Received has value: null at __EXTERNAL_MATCHER_TRAP__ (/home/runner/work/gutenberg/gutenberg/node_modules/expect/build/index.js:325:30) at Object.throwingMatcher (/home/runner/work/gutenberg/gutenberg/node_modules/expect/build/index.js:326:15) at Object.toHaveAttribute (/home/runner/work/gutenberg/gutenberg/packages/block-editor/src/components/link-control/test/index.js:2039:26) 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 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 325 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

Error: expect(received).toHaveAttribute() received value must be an HTMLElement or an SVGElement. Received has value: null at __EXTERNAL_MATCHER_TRAP__ (/home/runner/work/gutenberg/gutenberg/node_modules/expect/build/index.js:325:30) at Object.throwingMatcher (/home/runner/work/gutenberg/gutenberg/node_modules/expect/build/index.js:326:15) at Object.toHaveAttribute (/home/runner/work/gutenberg/gutenberg/packages/block-editor/src/components/link-control/test/index.js:2039:26) 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 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 325 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

Error: expect(received).toHaveAttribute() received value must be an HTMLElement or an SVGElement. Received has value: null at __EXTERNAL_MATCHER_TRAP__ (/home/runner/work/gutenberg/gutenberg/node_modules/expect/build/index.js:325:30) at Object.throwingMatcher (/home/runner/work/gutenberg/gutenberg/node_modules/expect/build/index.js:326:15) at Object.toHaveAttribute (/home/runner/work/gutenberg/gutenberg/packages/block-editor/src/components/link-control/test/index.js:2039:26) 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 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)
value={ { url: 'https://example.com' } }
forceIsEditingLink
/>
Expand Down Expand Up @@ -795,7 +795,7 @@
}

const submitButton = screen.queryByRole( 'button', {
name: 'Save',
name: 'Apply',
} );

// Verify the submission UI is disabled.
Expand Down Expand Up @@ -2494,7 +2494,7 @@

await user.click( submitButton );

expect( mockOnChange ).toHaveBeenCalledWith(

Check failure on line 2497 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected) Expected: ObjectContaining {"title": "My new text value"} Number of calls: 0 at Object.toHaveBeenCalledWith (/home/runner/work/gutenberg/gutenberg/packages/block-editor/src/components/link-control/test/index.js:2497:26)

Check failure on line 2497 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected) Expected: ObjectContaining {"title": "My new text value"} Number of calls: 0 at Object.toHaveBeenCalledWith (/home/runner/work/gutenberg/gutenberg/packages/block-editor/src/components/link-control/test/index.js:2497:26)

Check failure on line 2497 in packages/block-editor/src/components/link-control/test/index.js

View workflow job for this annotation

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

Error: expect(jest.fn()).toHaveBeenCalledWith(...expected) Expected: ObjectContaining {"title": "My new text value"} Number of calls: 0 at Object.toHaveBeenCalledWith (/home/runner/work/gutenberg/gutenberg/packages/block-editor/src/components/link-control/test/index.js:2497:26)
expect.objectContaining( {
title: textValue,
} )
Expand Down
Loading