fix(webui): preserve named pane groups
This commit is contained in:
1 parent
1fe14f2ee6
commit
caab883f9f
4 files changed
+136
-7
No files matched your search
@@ -53,7 +53,7 @@ describe("workbench model", () => {
|
||||
state = renameWorkbenchTab(state, tabKey, "Research");
|
||||
|
||||
expect(workbenchTab(state, tabKey)).toEqual({
|
||||
explicit: false,
|
||||
explicit: true,
|
||||
title: "Research",
|
||||
paneKeys: ["pane-a", "pane-b"],
|
||||
layoutPaneKeys: ["pane-a", "pane-b"],
|
||||
@@ -62,6 +62,24 @@ describe("workbench model", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves a named group when a pane is detached", () => {
|
||||
let state = addWorkbenchPane(EMPTY_WORKBENCH_STATE, "pane-a", "pane-b");
|
||||
const tabKey = workbenchTabForPane(state, "pane-a").tabKey;
|
||||
state = renameWorkbenchTab(state, tabKey, "Research");
|
||||
state = detachWorkbenchPane(state, tabKey, "pane-b");
|
||||
|
||||
expect(workbenchTab(state, tabKey)).toEqual({
|
||||
explicit: true,
|
||||
title: "Research",
|
||||
paneKeys: ["pane-a"],
|
||||
layoutPaneKeys: ["pane-a"],
|
||||
layout: "columns",
|
||||
splitRatios: [],
|
||||
});
|
||||
expect(normalizeWorkbenchState(state)).toEqual(state);
|
||||
expect(reconcileWorkbench(state, new Set(["pane-a"]))).toEqual(state);
|
||||
});
|
||||
|
||||
it("detaches a pane without persisting its standalone projection", () => {
|
||||
let state = addWorkbenchPane(EMPTY_WORKBENCH_STATE, "pane-a", "pane-b");
|
||||
const tabKey = workbenchTabForPane(state, "pane-a").tabKey;
|
||||
@@ -198,7 +216,7 @@ describe("workbench model", () => {
|
||||
);
|
||||
|
||||
expect(workbenchTab(reconciled, "alpha")).toEqual({
|
||||
explicit: false,
|
||||
explicit: true,
|
||||
title: "Alpha",
|
||||
paneKeys: ["pane-a", "pane-b"],
|
||||
layoutPaneKeys: ["pane-a", "pane-b"],
|
||||
|
||||
Reference in new issue
Block a user