Skip to content

Commit 4902d00

Browse files
committed
test: 🧪 fixed e2e test cases issue
1 parent 61f9762 commit 4902d00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cypress/e2e/app.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
describe('Vite React Typescript Template Test Suite', () => {
22
it('should navigate to about page', () => {
33
cy.visit('/');
4-
cy.get('.MuiCardHeader-content > .MuiTypography-root').should('contain.text', 'Home Page');
4+
cy.findByRole('heading', { level: 5 }).should('contain.text', 'Home Page');
55
cy.get('button>a:contains("About")').click();
6-
cy.get('.MuiCardHeader-content > .MuiTypography-root').should('contain.text', 'About Page');
6+
cy.findByRole('heading', { level: 5 }).should('contain.text', 'About Page');
77
});
88

99
it('should perform counter operations', () => {
@@ -45,7 +45,7 @@ describe('Vite React Typescript Template Test Suite', () => {
4545
cy.get('.Counter [role="note"]').should('contain.text', 'count is -1');
4646

4747
cy.get('button>a:contains("About")').click();
48-
cy.get('.MuiCardHeader-content > .MuiTypography-root').should('contain.text', 'About Page');
48+
cy.findByRole('heading', { level: 5 }).should('contain.text', 'About Page');
4949

5050
cy.get('.Counter [role="note"]').should('contain.text', 'count is -1');
5151
});

0 commit comments

Comments
 (0)