Skip to content

Commit

Permalink
Update Calendar.cy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
reachaadrika authored Jul 9, 2023
1 parent 1db2378 commit 7dbfa49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cypress/test/Calendar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ describe('Calendar component', () => {
});

it('renders the upcoming events', () => {
cy.get('[data-testid="Calender-list"]').should('have.length', eventsData.length);
cy.get('[data-testid="Calendar-list-item"]').should('have.length', eventsData.length);
});

it('renders the "View Calendar" button if events exist', () => {
if (eventsData.length > 0) {
cy.get('[data-testid="Calendar-button"]').should('be.visible');
} else {
cy.get('[data-testid="Calender-button"]').should('not.exist');
cy.get('[data-testid="Calendar-button"]').should('not.exist');
}
});

Expand Down

0 comments on commit 7dbfa49

Please sign in to comment.