Skip to content

Commit

Permalink
Fix ProductBadge query value (#305)
Browse files Browse the repository at this point in the history
* Reset queryParams on ProductBadge click

* Add todo test
  • Loading branch information
jeffdaley authored Aug 28, 2023
1 parent 282626a commit 497f46f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/app/components/product-badge-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export default class ProductBadgeLinkComponent extends Component<ProductBadgeLin
if (this.args.productArea) {
return {
product: [this.args.productArea],
docType: [],
owners: [],
page: 1,
sortBy: "dateDesc",
status: [],
};
} else {
return {};
Expand Down
12 changes: 12 additions & 0 deletions web/tests/acceptance/authenticated/all-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,16 @@ module("Acceptance | authenticated/all", function (hooks) {
.dom(PRODUCT_BADGE_LINK_SELECTOR)
.hasAttribute("href", "/all?product=%5B%22Labs%22%5D");
});

/**
* We want to test that clicking the product badge replaces filters
* rather than compound them, but we don't yet have the Mirage
* factories to support this.
*/
todo(
"product badges have the correct hrefs when other filters are active",
async function (this: AuthenticatedAllRouteTestContext, assert) {
assert.true(false);
}
);
});

0 comments on commit 497f46f

Please sign in to comment.