Skip to content

Commit

Permalink
fix: broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri committed Oct 11, 2023
1 parent 3dbe878 commit 5d9a5d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/app/Scenes/Activity/ActivityItem.tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ describe("ActivityItem", () => {
paramValue: "-published_at",
},
],
scrollToArtworksGrid: true,
searchCriteriaID: undefined,
},
})
})
Expand All @@ -137,6 +139,7 @@ describe("ActivityItem", () => {

expect(navigate).toHaveBeenCalledWith(alertTargetUrl, {
passProps: {
scrollToArtworksGrid: true,
searchCriteriaID: "searchCriteriaId",
predefinedFilters: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function navigateToResult(result: AutosuggestResult, props?: PassedProps) {
} else if (result.displayType === "Fair") {
navigateToEntity(result.href!, EntityType.Fair, SlugType.ProfileID)
} else if (result.__typename === "Artist") {
navigate(result.href!, { passProps: props })
navigate(`${result.href!}/artworks`, { passProps: props })
} else {
navigate(result.href!)
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ function getDomainMap(): Record<string, RouteMatcher[] | null> {
...params,
initialTab: "Insights",
})),
addRoute("/artist/:artistID/artworks", "Artist", (params) => ({
...params,
scrollToArtworksGrid: true,
})),
// addRoute("/artist/:artistID/artworks", "Artist", (params) => ({
// ...params,
// initialTab: "Insights",
// })),
addRoute("/artist/:artistID/shows", "ArtistShows"),

// Routes `/artist/:artistID/*` and `"/:profile_id_ignored/artist/:artistID"`
Expand Down

0 comments on commit 5d9a5d0

Please sign in to comment.