Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cypress/e2e/attendeeApproval.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ function rsvpAsGuest(eventID: string, name: string) {
visitFresh(`/${eventID}`);
cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
// Wait for Bootstrap's fade transition to finish - when it does, the modal
// steals focus (Bootstrap calls modal.focus() on shown), silently
// swallowing any keystrokes typed mid-transition
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type(name);
cy.get("form#attendEventForm").submit();
cy.get("#rsvpSuccessModal", { timeout: 10000 }).should("be.visible");
Expand Down Expand Up @@ -109,6 +113,7 @@ describe("Attendee Approval Feature", () => {
// RSVP to the event
cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("Regular Guest");
cy.get("form#attendEventForm").submit();

Expand All @@ -121,6 +126,7 @@ describe("Attendee Approval Feature", () => {

cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("Regular Guest");
cy.get("form#attendEventForm").submit();

Expand Down Expand Up @@ -149,6 +155,7 @@ describe("Attendee Approval Feature", () => {

cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("Pending Guest");
cy.get("#removalPassword").invoke("val").as("guestPassword");
cy.get("form#attendEventForm").submit();
Expand All @@ -169,6 +176,7 @@ describe("Attendee Approval Feature", () => {

cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("First Guest");
cy.get("form#attendEventForm").submit();

Expand Down
8 changes: 8 additions & 0 deletions cypress/e2e/event.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ describe("Events", () => {

it("allows you to attend an event - visible in public list", function () {
cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
// The focus wait sees out Bootstrap's fade transition, which ends by
// stealing focus to the modal, swallowing keystrokes typed until then
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("Test Attendee");
cy.get("#attendeeNumber").focus();
cy.get("#attendeeNumber").clear();
Expand All @@ -79,6 +83,8 @@ describe("Events", () => {

it("allows you to attend an event - hidden from public list", function () {
cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("Test Attendee");
cy.get("#attendeeNumber").focus();
cy.get("#attendeeNumber").clear();
Expand Down Expand Up @@ -323,6 +329,8 @@ describe("Events", () => {

it("removes you from the event with a one-click unattend link", function () {
cy.get("button#attendEvent").click();
cy.get("#attendModal").should("be.visible");
cy.get("#attendModal").should("have.focus");
cy.get("#attendeeName").type("Test Attendee");
cy.get("#attendeeNumber").focus();
cy.get("#attendeeNumber").clear();
Expand Down
Loading