In the web app (apps/web), the test fails when running the component test using Cypress. However, when using the HTML tag in the component that we test against, the test passes.
To Reproduce
Step 1: Create a Component
Create a new component with any name you wish.
Step 2: Add a Basic Material UI Component
Add a basic component from Material UI to the component you created in Step 1. For example, you can add a Button component:
import React from 'react';
import Button from '@mui/material/Button';
const MyComponent = () => {
return (
<div>
<Button variant="contained" color="primary">
Click me
</Button>
</div>
);
};
Step 3: Create a Test Component
Create a test component to test the component you created in Step 2.
Step 4: Run the Test
Open the terminal and run the following command:
start-server-and-test dev http://localhost:3000 "cypress run --e2e"
Describe the Bug
In the web app (apps/web), the test fails when running the component test using Cypress. However, when using the HTML tag in the component that we test against, the test passes.
To Reproduce
Step 1: Create a Component
Create a new component with any name you wish.
Step 2: Add a Basic Material UI Component
Add a basic component from Material UI to the component you created in Step 1. For example, you can add a
Button
component:Step 3: Create a Test Component
Create a test component to test the component you created in Step 2.
Step 4: Run the Test
Open the terminal and run the following command:
screenshots