From 936113eb76f5e1619acd8b8a13ace5c77a1ddf3d Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Wed, 28 Jan 2026 19:56:07 +0100 Subject: [PATCH] Update expected tooltip text for switch action Update SwitchToHistoryLink tests to reflect the new tooltip label "Switch to history and view dataset" when switching histories with filters applied, ensuring assertions match current UI behavior and intent. --- .../components/History/SwitchToHistoryLink.test.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/src/components/History/SwitchToHistoryLink.test.ts b/client/src/components/History/SwitchToHistoryLink.test.ts index e7b16cbaefa..ea39c97cdea 100644 --- a/client/src/components/History/SwitchToHistoryLink.test.ts +++ b/client/src/components/History/SwitchToHistoryLink.test.ts @@ -127,7 +127,11 @@ function mountSwitchToHistoryLinkForHistory(history: HistorySummaryExtended, has * @param setsFilters Whether filters are applied to the current history on click */ async function expectActionForHistory( - tooltip: "Switch to this history" | "This is your current history" | "View in new tab" | "Show in history", + tooltip: + | "Switch to this history" + | "This is your current history" + | "View in new tab" + | "Switch to history and view dataset", history: HistorySummaryExtended, opensInNewTab = false, hasFilters = false, @@ -192,7 +196,7 @@ describe("SwitchToHistoryLink", () => { await expectActionForHistory("Switch to this history", history, false, false, true, false); // Since history was not current, we switch to it AND apply filters - await expectActionForHistory("Show in history", history, false, true, true, true); + await expectActionForHistory("Switch to history and view dataset", history, false, true, true, true); }); it("only applies filters when the history is the Current history", async () => { @@ -209,7 +213,7 @@ describe("SwitchToHistoryLink", () => { await expectActionForHistory("This is your current history", history); // Since history is already current, we only apply filters - await expectActionForHistory("Show in history", history, false, true, false, true); + await expectActionForHistory("Switch to history and view dataset", history, false, true, false, true); }); it("opens purged history in new tab or applies filters", async () => { @@ -226,7 +230,7 @@ describe("SwitchToHistoryLink", () => { await expectActionForHistory("View in new tab", history, true); // We switch to the purged history and apply filters - await expectActionForHistory("Show in history", history, false, true, true, true); + await expectActionForHistory("Switch to history and view dataset", history, false, true, true, true); }); it("opens archived history in new tab or applies filters", async () => { @@ -243,7 +247,7 @@ describe("SwitchToHistoryLink", () => { await expectActionForHistory("View in new tab", history, true); // We switch to the archived history and apply filters - await expectActionForHistory("Show in history", history, false, true, true, true); + await expectActionForHistory("Switch to history and view dataset", history, false, true, true, true); }); it("only opens an accessible unowned history in new tab", async () => {