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: Replace interaction test -> component test #30333

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

kylegach
Copy link
Contributor

@kylegach kylegach commented Jan 22, 2025

What I did

In the Test addon panel's empty state and all CLI template stories, replace "interaction test" with "component test"

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

  1. Run a sandbox for template, e.g. yarn task --task sandbox --start-from auto --template react-vite/default-ts
  2. Open Storybook in your browser
  3. Confirm that the generated stories have the correct comment and the Test addon panel's empty state is correct

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.9 MB 77.9 MB 0 B 1.67 0%
initSize 131 MB 131 MB -12 B 1.85 0%
diffSize 53 MB 53 MB -12 B 1.83 0%
buildSize 7.19 MB 7.19 MB 0 B 1.22 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -1.22 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 1.22 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B 1.22 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B 1.22 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 6.6s 20s 13.3s 0.93 66.8%
generateTime 18.9s 21.2s 2.3s 0.23 10.9%
initTime 12.8s 14.8s 2s 0.5 13.5%
buildTime 8.6s 8.1s -509ms -1.16 -6.3%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.3s 4.8s -537ms -0.11 -11.1%
devManagerResponsive 3.5s 3.4s -105ms -0.28 -3%
devManagerHeaderVisible 626ms 602ms -24ms 0.23 -4%
devManagerIndexVisible 657ms 674ms 17ms 0.89 2.5%
devStoryVisibleUncached 2.4s 2s -394ms 0.65 -19%
devStoryVisible 658ms 673ms 15ms 1.09 2.2%
devAutodocsVisible 585ms 532ms -53ms 0.38 -10%
devMDXVisible 628ms 507ms -121ms -0.44 -23.9%
buildManagerHeaderVisible 657ms 582ms -75ms 0.35 -12.9%
buildManagerIndexVisible 744ms 696ms -48ms 0.83 -6.9%
buildStoryVisible 636ms 570ms -66ms 0.46 -11.6%
buildAutodocsVisible 557ms 427ms -130ms -0.7 -30.4%
buildMDXVisible 502ms 432ms -70ms -0.31 -16.2%

Greptile Summary

Updates terminology from 'interaction testing' to 'component testing' across multiple template files and the Test addon panel's empty state, ensuring consistent documentation and UI messaging.

  • Changed title and description text in code/addons/test/src/components/EmptyState.tsx from 'Interaction testing' to 'Component testing'
  • Updated documentation URLs from '/writing-tests/interaction-testing' to '/writing-tests/component-testing' across 20 template files
  • Added loading state in EmptyState component to prevent UI flicker
  • Maintained consistent functionality while only updating terminology
  • Needs unit tests and integration tests to verify changes

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@kylegach kylegach added cli patch:yes Bugfix & documentation PR that need to be picked to main branch addon: test labels Jan 22, 2025
@kylegach kylegach self-assigned this Jan 22, 2025
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.

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

@@ -21,7 +21,7 @@ const meta: Meta<typeof MyPage> = {
export default meta;
type Story = StoryObj<typeof MyPage>;

// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
// More on component testing: https://storybook.js.org/docs/writing-tests/component-testing
export const LoggedIn: Story = {
play: async ({ canvasElement }: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

style: any type used in TypeScript - consider using a more specific type for canvasElement

@@ -21,7 +21,7 @@ const meta = {
export default meta;
type Story = StoryObj<typeof meta>;

// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
// More on component testing: https://storybook.js.org/docs/writing-tests/component-testing
export const LoggedIn: Story = {
play: async ({ canvasElement }: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Type 'any' used for canvasElement parameter. Consider using a more specific type for better type safety.

Copy link

nx-cloud bot commented Jan 22, 2025

View your CI Pipeline Execution ↗ for commit 80c12f5.

Command Status Duration Result
nx affected -t check -c production --parallel=7 ✅ Succeeded 26s View ↗
nx run-many -t build -c production --parallel=3 ✅ Succeeded 1m 19s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-22 03:52:36 UTC

@shilman shilman changed the title Test: Replace interaction test -> component test Addon Test: Replace interaction test -> component test Jan 22, 2025
@shilman shilman merged commit edbaea1 into next Jan 22, 2025
67 of 70 checks passed
@shilman shilman deleted the interactions-to-component-2 branch January 22, 2025 04:25
shilman added a commit that referenced this pull request Jan 23, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Addon Test: Replace `interaction test` -> `component test`

(cherry picked from commit edbaea1)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: test bug ci:normal cli patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants