Skip to content

Commit 00836f1

Browse files
committed
test: fix explore by missing hrefs
1 parent f71deab commit 00836f1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/app/Scenes/Search/components/ExploreByCategory/__tests__/ExploreByCategoryCard.tests.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ describe("ExploreByCategoryCard", () => {
3232
slug: "medium",
3333
title: "Medium",
3434
imageUrl: "https://example.com/image.jpg",
35+
href: "/collections-by-category/medium",
3536
}
3637

3738
const { renderWithRelay } = setupTestWrapper<ExploreByCategoryCardTestQuery>({
@@ -73,7 +74,10 @@ describe("ExploreByCategoryCard", () => {
7374
DiscoveryCategoriesConnectionConnection: () => ({
7475
edges: [{ node: mockCategory }],
7576
}),
76-
DiscoveryCategory: () => mockCategory,
77+
DiscoveryCategory: () => ({
78+
...mockCategory,
79+
href: "/collections-by-category/medium",
80+
}),
7781
})
7882

7983
expect(mockRouterLinkProps.to).toBe("/collections-by-category/medium")
@@ -106,7 +110,10 @@ describe("ExploreByCategoryCard", () => {
106110
DiscoveryCategoriesConnectionConnection: () => ({
107111
edges: [{ node: mockCategory }],
108112
}),
109-
DiscoveryCategory: () => mockCategory,
113+
DiscoveryCategory: () => ({
114+
...mockCategory,
115+
href: "/collections-by-category/medium",
116+
}),
110117
})
111118

112119
const routerLink = screen.getByTestId("router-link")
@@ -130,6 +137,7 @@ describe("ExploreByCategoryCard", () => {
130137
slug: "collect-by-color",
131138
title: "Color",
132139
imageUrl: "https://example.com/color.png",
140+
href: "/collections-by-category/collect-by-color",
133141
}
134142

135143
renderWithRelay({

0 commit comments

Comments
 (0)