summaryrefslogtreecommitdiff
path: root/cypress/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'cypress/e2e')
-rw-r--r--cypress/e2e/event.cy.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/cypress/e2e/event.cy.ts b/cypress/e2e/event.cy.ts
index ef8b249..10266b7 100644
--- a/cypress/e2e/event.cy.ts
+++ b/cypress/e2e/event.cy.ts
@@ -22,7 +22,7 @@ describe("Events", () => {
beforeEach(() => {
cy.clearLocalStorage();
- cy.visit("/new/event/public");
+ cy.visit("/new");
cy.get("#showNewEventFormButton").click();
cy.get("#eventName").type(eventData.eventName);
@@ -95,4 +95,21 @@ describe("Events", () => {
cy.get(".dt-duration").should("contain.text", startTime);
cy.get(".dt-duration").should("contain.text", endTime);
});
+
+ it("allows you to attend an event", function () {
+ cy.get("button#attendEvent").click();
+ cy.get("#attendeeName").type("Test Attendee");
+ cy.get("#attendeeNumber").clear().type("2");
+ 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)");
+ });
+
+ it("allows you to comment on an event", function () {
+ cy.get("#commentAuthor").type("Test Author");
+ cy.get("#commentContent").type("Test Comment");
+ cy.get("#postComment").click();
+ cy.get(".comment").should("contain.text", "Test Author");
+ cy.get(".comment").should("contain.text", "Test Comment");
+ });
});