From e40ef51f26d04620b85fcbb15b5c9de857fcbf7b Mon Sep 17 00:00:00 2001 From: Raphael Kabo Date: Tue, 6 Feb 2024 09:06:33 +0000 Subject: Add tests --- cypress/e2e/event.cy.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'cypress/e2e') diff --git a/cypress/e2e/event.cy.ts b/cypress/e2e/event.cy.ts index 78cc2ca..8870164 100644 --- a/cypress/e2e/event.cy.ts +++ b/cypress/e2e/event.cy.ts @@ -86,7 +86,7 @@ describe("Events", () => { ); }); - it("allows you to attend an event", function () { + it("allows you to attend an event - visible in public list", function () { cy.get("button#attendEvent").click(); cy.get("#attendeeName").type("Test Attendee"); cy.get("#attendeeNumber").focus().clear(); @@ -99,6 +99,20 @@ describe("Events", () => { ); }); + it("allows you to attend an event - hidden from public list", function () { + cy.get("button#attendEvent").click(); + cy.get("#attendeeName").type("Test Attendee"); + cy.get("#attendeeNumber").focus().clear(); + cy.get("#attendeeNumber").type("2"); + cy.get("#attendeeVisible").uncheck(); + cy.get("form#attendEventForm").submit(); + cy.get("#attendees-alert").should("contain.text", "8 spots remaining"); + cy.get(".attendeesList").should( + "contain.text", + "Test Attendee (2 people) (hidden from public list)", + ); + }); + it("allows you to comment on an event", function () { cy.get("#commentAuthor").type("Test Author"); cy.get("#commentContent").type("Test Comment"); -- cgit v1.2.3