Skip to content

New to storybook, playwright integration? #24835

Answered by yannbf
alexbjorlig asked this question in Help
Discussion options

You must be logged in to vote

Hey there @alexbjorlig!

Let me add to what @Marklb said and try to explain the state of testing with Storybook. With Storybook, you can define stories for each state of your component, and that is a combination of two things:

  1. Rendering
    A combination of decorators, the render function of your story, and its args being applied to it.
  2. Play function
    A function that gets executed after the story renders. Useful to get to states that need user interactions, such as filling a form, clicking on a dropdown for its open state, etc. Additionally, the play function can also assert things via expect coming from @storybook/jest, which show a failure in the addon panel if the assertions do not match.

W…

Replies: 4 comments 16 replies

Comment options

You must be logged in to vote
1 reply
@alexbjorlig
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@shilman
Comment options

Answer selected by shilman
Comment options

You must be logged in to vote
14 replies
@yannbf
Comment options

@alexbjorlig
Comment options

@kasperpeulen
Comment options

@yannbf
Comment options

@alexbjorlig
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
10 participants