summaryrefslogtreecommitdiff
path: root/cypress/e2e
diff options
context:
space:
mode:
authorRaphael Kabo <raphaelkabo@hey.com>2024-02-06 09:06:33 +0000
committerRaphael Kabo <raphaelkabo@hey.com>2024-02-06 09:06:33 +0000
commite40ef51f26d04620b85fcbb15b5c9de857fcbf7b (patch)
treeff9c1b7784b436002a2ebfa86779c4e25ecf64b1 /cypress/e2e
parentc0f58b298248ba8682b556389525280c7088e025 (diff)
Add tests
Diffstat (limited to 'cypress/e2e')
-rw-r--r--cypress/e2e/event.cy.ts16
1 files changed, 15 insertions, 1 deletions
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");