chromaui / addon-visual-tests

Visual Tests addon for Storybook
MIT License
33 stars 2 forks source link

Only use criteria to select mode when story first loads #218

Closed andrewortwein closed 6 months ago

andrewortwein commented 6 months ago

QA

  1. Use a project with stories with modes:
    • One story should have a mode that is passed and then a mode that has changed, in that order
    • Another story should have the same modes, but both modes have changes
    • A third story should have additional modes that are not found in the first two stories, with changes
  2. Navigate to the first story and verify that the second mode (the one with changes) is selected
  3. Verify that you can change to the first mode and view the test
  4. Navigate to the second story and verify that the same mode is shown from step 3
  5. Navigate back to the first story and verify the the unchanged mode is selected (this takes precedence over a selected mode that does not contain changes)
  6. Navigate to the third story and select a mode that is unique to that story
  7. Navigate back to the first story and verify that the mode with changes is selected

    📦 Published PR as canary version: 1.2.22--canary.218.31120f4.0
    :sparkles: Test out this PR locally via: ```bash npm install @chromatic-com/storybook@1.2.22--canary.218.31120f4.0 # or yarn add @chromatic-com/storybook@1.2.22--canary.218.31120f4.0 ```
andrewortwein commented 6 months ago

@ghengeveld I made some updates to fix some typecheck problems and left a comment on a story I had to change. Please re-review this. Thanks.