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 Test: Make component tests status row link to the story's tests panel #29992

Merged
merged 7 commits into from
Dec 10, 2024

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Dec 9, 2024

What I did

Makes the Component tests row clickable if there's a failure or warning. It opens the first story with an error or warning, and opens the component tests addon panel.

Screenshot 2024-12-09 at 12 20 44

This is particularly relevant in the context menu, where this also applies.

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 1.48 kB -0.3 0%
initSize 133 MB 133 MB 1.5 kB 2.97 0%
diffSize 55.1 MB 55.1 MB 24 B 2.95 0%
buildSize 6.87 MB 6.87 MB 0 B 1.16 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 3 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 2.95 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB 0 B 3 0%
buildPreviewSize 3.3 MB 3.3 MB 0 B 1.13 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 7.4s 8.1s 691ms -0.41 8.5%
generateTime 21.5s 22s 489ms 0.81 2.2%
initTime 13.5s 14.4s 867ms 0.65 6%
buildTime 8.3s 13.5s 5.1s 8.35 🔺38.1%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.7s 5.8s 157ms 1.01 2.7%
devManagerResponsive 4.2s 4.2s 32ms 1.26 0.7%
devManagerHeaderVisible 576ms 647ms 71ms 1.1 11%
devManagerIndexVisible 677ms 724ms 47ms 0.71 6.5%
devStoryVisibleUncached 1.9s 1.4s -521ms -0.99 -36.4%
devStoryVisible 673ms 724ms 51ms 1.02 7%
devAutodocsVisible 686ms 556ms -130ms 0.22 -23.4%
devMDXVisible 562ms 615ms 53ms 1.42 🔺8.6%
buildManagerHeaderVisible 748ms 661ms -87ms 0.75 -13.2%
buildManagerIndexVisible 757ms 772ms 15ms 1.02 1.9%
buildStoryVisible 596ms 618ms 22ms 1.07 3.6%
buildAutodocsVisible 426ms 522ms 96ms 1.13 18.4%
buildMDXVisible 510ms 448ms -62ms 0.1 -13.8%

Greptile Summary

Makes the Component tests row clickable when there are test failures or warnings, directing users to the tests panel for the failing story.

  • Added click handler in code/addons/test/src/components/TestProviderRender.tsx to open tests panel for first failed/warning test result
  • Added openTestsPanel function in code/addons/test/src/manager.tsx to handle navigation to tests panel
  • Added warning status type in code/addons/test/src/node/reporter.ts alongside existing test statuses
  • Added status mapping in code/addons/test/src/manager.tsx to handle warning status display

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.

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

code/addons/test/src/components/TestProviderRender.tsx Outdated Show resolved Hide resolved
code/addons/test/src/manager.tsx Show resolved Hide resolved
code/addons/test/src/manager.tsx Outdated Show resolved Hide resolved
Copy link

nx-cloud bot commented Dec 9, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a1082cd. 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.

@ghengeveld ghengeveld changed the title Make component tests status row link to the story's tests panel Addon Test: Make component tests status row link to the story's tests panel Dec 9, 2024
@valentinpalkovic valentinpalkovic merged commit 7389774 into next Dec 10, 2024
58 of 59 checks passed
@valentinpalkovic valentinpalkovic deleted the link-to-tests-panel branch December 10, 2024 12:21
@valentinpalkovic valentinpalkovic self-assigned this Dec 10, 2024
@github-actions github-actions bot mentioned this pull request Dec 10, 2024
11 tasks
@yannbf yannbf added the needs qa Indicates that this needs manual QA during the upcoming minor/major release label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal feature request needs qa Indicates that this needs manual QA during the upcoming minor/major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants