Skip to content

A11y Addon: Adjust default behaviour when using with experimental-addon-test #42885

A11y Addon: Adjust default behaviour when using with experimental-addon-test

A11y Addon: Adjust default behaviour when using with experimental-addon-test #42885

Triggered via pull request January 7, 2025 15:08
Status Failure
Total duration 10m 35s
Artifacts

tests-unit.yml

on: pull_request
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

5 errors
src/automigrate/fixes/addon-a11y-addon-test.test.ts > addonA11yAddonTest > transformPreviewFile > should add a new tags property if it does not exist: code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-addon-test.test.ts#L601
AssertionError: expected '\r\n import type { Preview } f…' to be '\r\n import type { Preview } f…' // Object.is equality - Expected + Received import type { Preview } from '@storybook/react'; const preview: Preview = { parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i, }, }, }, // a11y-test tag controls whether accessibility tests are run as part of a standalone Vitest test run // For more information please visit: https://storybook.js.org/docs/writing-tests/accessibility-testing - tags: ['a11y-test'] + tags: ["a11y-test"] }; export default preview; ❯ src/automigrate/fixes/addon-a11y-addon-test.test.ts:601:27
src/automigrate/fixes/addon-a11y-addon-test.test.ts > addonA11yAddonTest > transformPreviewFile > should extend the existing tags property: code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-addon-test.test.ts#L672
AssertionError: expected '\r\n import type { Preview } f…' to be '\r\n import type { Preview } f…' // Object.is equality - Expected + Received import type { Preview } from '@storybook/react'; const preview: Preview = { // a11y-test tag controls whether accessibility tests are run as part of a standalone Vitest test run // For more information please visit: https://storybook.js.org/docs/writing-tests/accessibility-testing - tags: ['existingTag', 'a11y-test'], + tags: ["existingTag", "a11y-test"], parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i, }, }, }, }; export default preview; ❯ src/automigrate/fixes/addon-a11y-addon-test.test.ts:672:27
src/automigrate/fixes/addon-a11y-addon-test.test.ts > addonA11yAddonTest > transformPreviewFile > should not add a11y-test if it already exists in the tags property: code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-addon-test.test.ts#L696
AssertionError: expected '\n import type { Preview } fro…' to be '\r\n import type { Preview } f…' // Object.is equality - Expected + Received - + - import type { Preview } from '@storybook/react'; + import type { Preview } from '@storybook/react'; - + - const preview: Preview = { + const preview: Preview = { - tags: ['a11y-test'], + tags: ['a11y-test'], - parameters: { + parameters: { - controls: { + controls: { - matchers: { + matchers: { - color: /(background|color)$/i, + color: /(background|color)$/i, - date: /Date$/i, + date: /Date$/i, - }, + }, - }, + }, - }, + }, - }; + }; - + - export default preview; + export default preview; ❯ src/automigrate/fixes/addon-a11y-addon-test.test.ts:696:27
src/automigrate/fixes/addon-a11y-addon-test.test.ts > addonA11yAddonTest > transformPreviewFile > should extend the existing tags property without type annotations: code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-addon-test.test.ts#L766
AssertionError: expected '\r\n export default {\r\n …' to be '\r\n export default {\r\n …' // Object.is equality - Expected + Received export default { // a11y-test tag controls whether accessibility tests are run as part of a standalone Vitest test run // For more information please visit: https://storybook.js.org/docs/writing-tests/accessibility-testing - tags: ['existingTag', 'a11y-test'], + tags: ["existingTag", "a11y-test"], parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i, }, }, }, }; ❯ src/automigrate/fixes/addon-a11y-addon-test.test.ts:766:27
Core Unit Tests, windows-latest
Process completed with exit code 1.