Testing the Schedule Filter
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" ... |
Get Modern Front-End Development for Rails, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.