-
Notifications
You must be signed in to change notification settings - Fork 5k
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
chore: Create a story for AddNetworkModal component #25498
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions to remove interacting tests
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { Provider } from 'react-redux'; | ||
import { configureStore } from '@reduxjs/toolkit'; | ||
import { within, fireEvent } from '@storybook/testing-library'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove everything to do with play function and storybook/testing-library
play: async ({ canvasElement }) => { | ||
const canvas = within(canvasElement); | ||
await fireEvent.click(canvas.getByRole('button', { name: 'Open Modal' })); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
play: async ({ canvasElement }) => { | |
const canvas = within(canvasElement); | |
await fireEvent.click(canvas.getByRole('button', { name: 'Open Modal' })); | |
}, |
Going to close and try run again |
Description
This pull request adds a Storybook story for the AddNetworkModal component. The story includes a default story and a play function to simulate user interaction.
Related issues (if any)
Manual testing steps
Screenshots/Recordings
Case1
Pre-merge author checklist
Pre-merge reviewer checklist
Link to Devin run: https://preview.devin.ai/devin/a90b6f8241ea4a049ad7dafc383b349e
Requested by: Devin