From 5d9a5d0de81ceba00fb597ecc78afbcd8c7339d0 Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Wed, 11 Oct 2023 17:02:38 +0200 Subject: [PATCH] fix: broken test --- src/app/Scenes/Activity/ActivityItem.tests.tsx | 3 +++ .../Scenes/Search/components/AutosuggestSearchResult.tsx | 2 +- src/app/routes.ts | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/Scenes/Activity/ActivityItem.tests.tsx b/src/app/Scenes/Activity/ActivityItem.tests.tsx index 56be47d3c0d..4e2d3836bc3 100644 --- a/src/app/Scenes/Activity/ActivityItem.tests.tsx +++ b/src/app/Scenes/Activity/ActivityItem.tests.tsx @@ -116,6 +116,8 @@ describe("ActivityItem", () => { paramValue: "-published_at", }, ], + scrollToArtworksGrid: true, + searchCriteriaID: undefined, }, }) }) @@ -137,6 +139,7 @@ describe("ActivityItem", () => { expect(navigate).toHaveBeenCalledWith(alertTargetUrl, { passProps: { + scrollToArtworksGrid: true, searchCriteriaID: "searchCriteriaId", predefinedFilters: [ { diff --git a/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx b/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx index 1410ec43823..4252228c707 100644 --- a/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx +++ b/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx @@ -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!) } diff --git a/src/app/routes.ts b/src/app/routes.ts index 86f07e5e730..4b23948339f 100644 --- a/src/app/routes.ts +++ b/src/app/routes.ts @@ -138,10 +138,10 @@ function getDomainMap(): Record { ...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"`