diff --git a/src/Explorer/Tabs/SettingsTabV2.tsx b/src/Explorer/Tabs/SettingsTabV2.tsx index afb29d774..f87290d91 100644 --- a/src/Explorer/Tabs/SettingsTabV2.tsx +++ b/src/Explorer/Tabs/SettingsTabV2.tsx @@ -1,7 +1,6 @@ import { ActionType, OpenCollectionTab, TabKind } from "Contracts/ActionContracts"; import React from "react"; import * as ViewModels from "../../Contracts/ViewModels"; -import { useTabs } from "../../hooks/useTabs"; import { SettingsComponent } from "../Controls/Settings/SettingsComponent"; import TabsBase from "./TabsBase"; @@ -24,21 +23,6 @@ export class CollectionSettingsTabV2 extends SettingsTabV2 { }; } - public canDuplicate(): boolean { - return true; - } - - public duplicateTab(): void { - const newTab = new CollectionSettingsTabV2({ - tabKind: ViewModels.CollectionTabKind.CollectionSettingsV2, - title: this.tabTitle(), - tabPath: "", - collection: this.collection, - node: this.collection, - }); - useTabs.getState().activateNewTab(newTab); - } - public onActivate(): void { super.onActivate(); this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.CollectionSettingsV2); diff --git a/test/sql/duplicateTab.spec.ts b/test/sql/duplicateTab.spec.ts index d1de09f80..eeaf40e32 100644 --- a/test/sql/duplicateTab.spec.ts +++ b/test/sql/duplicateTab.spec.ts @@ -77,25 +77,6 @@ test("Duplicate Query tab preserves query text in new tab", async () => { expect(editorText).toContain("duplicate-query-test"); }); -test("Duplicate Scale & Settings tab opens a second settings tab", async () => { - await explorer.openScaleAndSettings(context); - - // Wait for the settings tab pane to be attached - const tab0 = explorer.tab("tab0"); - await expect(tab0).toBeAttached({ timeout: 30_000 }); - - // Right-click the tab nav header - await explorer.tabNavHeader("tab0").click({ button: "right" }); - - const duplicateMenuItem = explorer.tabContextMenuItem("Duplicate tab"); - await expect(duplicateMenuItem).toBeVisible(); - await duplicateMenuItem.click(); - - // A second settings tab should appear - const tab1 = explorer.tab("tab1"); - await expect(tab1).toBeAttached({ timeout: 30_000 }); -}); - test("Duplicate tab menu item is not shown for the Home tab", async () => { // The Home tab (ReactTabKind) is never duplicable await explorer.tabNavHeader("Home").click({ button: "right" });