diff options
| author | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-06 16:16:08 +0100 | 
|---|---|---|
| committer | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-06 16:19:03 +0100 | 
| commit | c52e51fe5dcc22bed5671d3931c76c47130d3da5 (patch) | |
| tree | c2bb3015874c71130f972a39069d87ee3f47ec52 /cypress/e2e | |
| parent | 1f7a23106bcd107a02e7dafbd006062edabbaece (diff) | |
Add new Cypress tests
Diffstat (limited to 'cypress/e2e')
| -rw-r--r-- | cypress/e2e/event.cy.ts | 19 | 
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"); +  });  });  | 
