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

Addon A11y: Fix skipped status handling in Testing Module #30077

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Dec 16, 2024

Closes #

What I did

  • Added a skipped label for Accessibility in the Testing Module
  • Only show the Accessibility status if Accessibility is enabled and it is not skipped

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B 1.36 0%
initSize 136 MB 136 MB 0 B 0.49 0%
diffSize 58.4 MB 58.4 MB 0 B 0.12 0%
buildSize 7.24 MB 7.24 MB 0 B 1.34 0%
buildSbAddonsSize 1.88 MB 1.88 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 1.61 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.93 MB 3.93 MB 0 B 1.61 0%
buildPreviewSize 3.3 MB 3.3 MB 0 B -0.77 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 7s 8.5s 1.5s -0.73 17.5%
generateTime 21.6s 27.7s 6.1s 5.03 🔺22%
initTime 15.4s 17.3s 1.9s 2.42 🔺11%
buildTime 8.9s 8.8s -127ms -0.89 -1.4%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.4s 5.6s 1.2s 0.68 21.5%
devManagerResponsive 3.3s 4.2s 834ms 0.71 19.7%
devManagerHeaderVisible 592ms 827ms 235ms 1.74 🔺28.4%
devManagerIndexVisible 618ms 864ms 246ms 1.54 🔺28.5%
devStoryVisibleUncached 1.7s 1.9s 172ms 0.43 8.8%
devStoryVisible 617ms 865ms 248ms 1.59 🔺28.7%
devAutodocsVisible 511ms 565ms 54ms 0.12 9.6%
devMDXVisible 477ms 627ms 150ms 0.8 23.9%
buildManagerHeaderVisible 555ms 776ms 221ms 1.45 🔺28.5%
buildManagerIndexVisible 631ms 789ms 158ms 0.52 20%
buildStoryVisible 513ms 644ms 131ms 0.56 20.3%
buildAutodocsVisible 432ms 521ms 89ms 0.75 17.1%
buildMDXVisible 398ms 476ms 78ms -0.05 16.4%

Greptile Summary

Based on the provided files and changes, I'll create a concise summary of this pull request:

Enhanced accessibility test handling in Storybook's test addon with improved configuration management and skipped test support.

  • Added skipped test count display and handling in code/addons/test/src/components/TestProviderRender.tsx
  • Consolidated test configuration into a single config object with new a11y property in code/addons/test/src/node/test-manager.ts
  • Added config field to test result Details type in code/addons/test/src/constants.ts
  • Updated StorybookReporter to include test configuration in progress reports in code/addons/test/src/node/reporter.ts
  • Modified VitestManager to access watchMode through testManager.config in code/addons/test/src/node/vitest-manager.ts

@valentinpalkovic valentinpalkovic self-assigned this Dec 16, 2024
@valentinpalkovic valentinpalkovic changed the title Addon A11y: Refactor results handling and update configuration management in TestManager Addon A11y: Show skipped label and fix A11y status handling in Testing Module Dec 16, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

...this.config,
...payload.config,
} satisfies Config;

process.env.VITEST_STORYBOOK_CONFIG = JSON.stringify(payload.config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: storing the entire payload.config in env var may expose more configuration than intended - consider only storing necessary fields

@valentinpalkovic valentinpalkovic force-pushed the valentin/a11y-show-skipped-tests branch from da4209e to 66fb449 Compare December 16, 2024 14:10
Copy link

nx-cloud bot commented Dec 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 3cded02. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@valentinpalkovic valentinpalkovic merged commit 4b23a1a into next Dec 18, 2024
58 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/a11y-show-skipped-tests branch December 18, 2024 10:32
@github-actions github-actions bot mentioned this pull request Dec 18, 2024
6 tasks
@shilman shilman changed the title Addon A11y: Show skipped label and fix A11y status handling in Testing Module Addon A11y: Fix skipped status handling in Testing Module Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants