diff --git a/apps/spruce/cypress/integration/waterfall/filters.ts b/apps/spruce/cypress/integration/waterfall/filters.ts index 1f1722d83..8b069d395 100644 --- a/apps/spruce/cypress/integration/waterfall/filters.ts +++ b/apps/spruce/cypress/integration/waterfall/filters.ts @@ -204,3 +204,19 @@ describe("revision filtering", () => { .invoke("attr", "data-highlighted", "true"); }); }); + +describe("clear all filters button", () => { + it("clicking the clear filters button clears all parameters except for minOrder & maxOrder", () => { + cy.visit( + "/project/spruce/waterfall?buildVariants=ubuntu&maxOrder=1235&requesters=gitter_request&statuses=success&tasks=test", + ); + cy.dataCy("waterfall-menu").click(); + cy.dataCy("clear-all-filters").click(); + + cy.location("search").should("not.contain", "buildVariants"); + cy.location("search").should("not.contain", "tasks"); + cy.location("search").should("not.contain", "statuses"); + cy.location("search").should("not.contain", "requesters"); + cy.location("search").should("contain", "maxOrder=1235"); + }); +}); diff --git a/apps/spruce/src/analytics/waterfall/useWaterfallAnalytics.ts b/apps/spruce/src/analytics/waterfall/useWaterfallAnalytics.ts index 31a9dcd6c..b26238ecc 100644 --- a/apps/spruce/src/analytics/waterfall/useWaterfallAnalytics.ts +++ b/apps/spruce/src/analytics/waterfall/useWaterfallAnalytics.ts @@ -15,6 +15,7 @@ type Action = | { name: "Clicked variant label" } | { name: "Clicked task box"; "task.status": string } | { name: "Clicked jump to most recent commit button" } + | { name: "Clicked clear all filters button" } | { name: "Clicked pin build variant"; action: "pinned" | "unpinned"; diff --git a/apps/spruce/src/components/FilterChips/__snapshots__/FilterChips_Default.storyshot b/apps/spruce/src/components/FilterChips/__snapshots__/FilterChips_Default.storyshot index 41e5a5247..f8e2a160e 100644 --- a/apps/spruce/src/components/FilterChips/__snapshots__/FilterChips_Default.storyshot +++ b/apps/spruce/src/components/FilterChips/__snapshots__/FilterChips_Default.storyshot @@ -44,7 +44,7 @@