Skip to content

[Bug] StoryWright fails to fetch Steps when hooks are used in story #51

@TristanWatanabe

Description

@TristanWatanabe

Issue:

  • Whenever a hook is used within a story, StoryWright considers the Steps object as undefined and does not take a screenshot. Only a static screenshot is taken.

Expected Behavior:

  • A static screenshot AND a screenshot with the Steps executed are taken.

Steps to Reproduce:

  1. Clone repro branch https://github.com/TristanWatanabe/fluentui/tree/storywright-hooks-bug
  2. Run yarn workspace @fluentui/react-components vr:build
  3. Run yarn workspace @fluentui/react-components vr:test
  4. Observe dist/screenshots folder and see issue - only a static screenshot is taken (Component.Example With Hook.chromium.png). Comment out the useStyles() invocation in the story in the src/stories/Example/Example.stories.tsx file and re-run steps 2 and 3 to see the expected behavior where BOTH static screenshot and a steps screenshot are taken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions