Ask organizer modal implemented

This commit is contained in:
adilallo
2026-05-11 18:03:52 -06:00
parent b5930331c0
commit 625a8c3161
29 changed files with 724 additions and 56 deletions
+13 -7
View File
@@ -130,7 +130,7 @@ describe("Page Flow Integration", () => {
screen.getByText("Get answers from an experienced organizer"),
).toBeInTheDocument();
expect(
screen.getByRole("link", { name: /Ask an organizer/i }),
screen.getByRole("button", { name: /ask an organizer/i }),
).toBeInTheDocument();
});
@@ -198,9 +198,9 @@ describe("Page Flow Integration", () => {
test("ask organizer section has proper call-to-action", () => {
render(<Page />);
const askLink = screen.getByRole("link", { name: /Ask an organizer/i });
expect(askLink).toBeInTheDocument();
expect(askLink).toHaveAttribute("href", "#contact");
const askCta = screen.getByRole("button", { name: /ask an organizer/i });
expect(askCta).toBeInTheDocument();
expect(askCta).not.toHaveAttribute("href");
});
test("page maintains proper semantic structure", async () => {
@@ -223,16 +223,22 @@ describe("Page Flow Integration", () => {
expect(mainContent).toBeInTheDocument();
});
test("all interactive elements are accessible", () => {
test("all interactive elements are accessible", async () => {
render(<Page />);
// Check all buttons have proper roles
await waitFor(() => {
expect(screen.getAllByRole("button").length).toBeGreaterThan(0);
});
const buttons = screen.getAllByRole("button");
buttons.forEach((button) => {
expect(button).toBeInTheDocument();
});
// Check all links have proper roles
await waitFor(() => {
expect(screen.getAllByRole("link").length).toBeGreaterThan(0);
});
const links = screen.getAllByRole("link");
links.forEach((link) => {
expect(link).toBeInTheDocument();
+5 -4
View File
@@ -121,10 +121,11 @@ describe("User Journey Integration", () => {
screen.getByText("Get answers from an experienced organizer"),
).toBeInTheDocument();
// User clicks the ask organizer button (it's actually a link, not a button)
const askLink = screen.getByRole("link", { name: /Ask an organizer/i });
await user.click(askLink);
expect(askLink).toHaveAttribute("href", "#contact");
const askCta = screen.getByTestId("ask-organizer-cta");
await user.click(askCta);
expect(
await screen.findByRole("dialog", { name: /ask an organizer/i }),
).toBeInTheDocument();
});
test("user explores the process through CardSteps", async () => {