Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const FilterPanel: FC<FilterPanelProps> = ({ mealPantry, filterCount }) => {
{`${filterCount} ${filterCount === 1 ? "Location" : "Locations"}`}
</Typography>
{isDesktop ? (
<IconButton onClick={handleDrawerClose}>
<IconButton aria-label="Close filters" onClick={handleDrawerClose}>
<CloseIcon />
</IconButton>
) : (
Expand Down
14 changes: 14 additions & 0 deletions client/tests/organizations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,18 @@ test.describe("Organizations", () => {
await expect(page.getByText("Stakeholder 2")).toBeVisible();
await expect(page.getByText("Stakeholder 3")).toBeHidden();
});

test("filter panel close button has an accessible name and closes the panel", async ({
page,
}) => {
await mockRequests(page);
await page.goto("/organizations");
await page.getByRole("button", { name: "More Filters" }).click();

const closeFilters = page.getByRole("button", { name: "Close filters" });
await expect(closeFilters).toBeVisible();

await closeFilters.click();
await expect(closeFilters).toBeHidden();
});
});