September 2022
Intermediate to advanced
410 pages
10h 7m
English
Let’s write more examples in Cypress that cover at least some of the other features we’ve written in Stimulus and React. Here’s a longer series of tests that deals with the calendar filter at the top of the schedule page. The behavior we’re checking here is to confirm that clicking on a calendar item makes only concerts with that date visible and that clicking back to a state of no clicks makes everything visible again.
Here’s the code:
| | describe("calendar filters", () => { |
| | beforeEach(() => { |
| | cy.visit("/") |
| | cy.get("#calendar-day-2022-04-11").first().as("dayOne") |
| | cy.get("#calendar-day-2022-04-12").first().as("dayTwo") |
| | cy.get( ... |