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

chore: Create a story for AddNetworkModal component #25498

Closed
wants to merge 1 commit into from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jun 24, 2024

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.

Open in GitHub Codespaces

Related issues (if any)

Manual testing steps

  1. Go to the latest build of storybook in this PR
  2. Navigate to the AddNetworkModal component in the Components/ folder.

Screenshots/Recordings

Case1
screenshot-1-name

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Link to Devin run: https://preview.devin.ai/devin/a90b6f8241ea4a049ad7dafc383b349e
Requested by: Devin

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner June 24, 2024 22:22
Copy link
Contributor

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.

@georgewrmarshall georgewrmarshall added team-design-system All issues relating to design system in Extension external-contributor labels Jul 2, 2024
@georgewrmarshall georgewrmarshall requested a review from a team July 2, 2024 22:44
@metamaskbot metamaskbot added the team-ai AI team (for the Devin AI bot) label Jul 15, 2024
Copy link
Contributor

@georgewrmarshall georgewrmarshall left a 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';
Copy link
Contributor

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

Comment on lines +77 to +80
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await fireEvent.click(canvas.getByRole('button', { name: 'Open Modal' }));
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this

Suggested change
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await fireEvent.click(canvas.getByRole('button', { name: 'Open Modal' }));
},

@georgewrmarshall
Copy link
Contributor

Going to close and try run again

@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-ai AI team (for the Devin AI bot) team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants