|
1 | 1 | import test from "node:test"; |
2 | 2 | import assert from "node:assert/strict"; |
3 | 3 | import { |
4 | | - createDefaultWorkbenchState, |
5 | 4 | normalizeWorkbenchState, |
6 | 5 | } from "../apps/web/src/state/workbench-core.ts"; |
7 | 6 | import { |
@@ -29,55 +28,7 @@ test("empty workbench state does not auto-open the launch overlay", () => { |
29 | 28 | assert.deepEqual(normalized.overlay.target, { type: "wsl", distro: "Ubuntu" }); |
30 | 29 | }); |
31 | 30 |
|
32 | | -test("default workbench state keeps the launch overlay hidden on startup", () => { |
33 | | - const initial = createDefaultWorkbenchState(); |
34 | | - |
35 | | - assert.equal(initial.tabs.length, 0); |
36 | | - assert.equal(initial.overlay.visible, false); |
37 | | -}); |
38 | | - |
39 | 31 | test("bootstrap with zero open workspaces keeps the launch overlay hidden", () => { |
40 | | - const next = buildWorkbenchStateFromBootstrap( |
41 | | - { |
42 | | - tabs: [], |
43 | | - activeTabId: "", |
44 | | - layout: { |
45 | | - leftWidth: 320, |
46 | | - rightWidth: 320, |
47 | | - rightSplit: 64, |
48 | | - showCodePanel: true, |
49 | | - showTerminalPanel: true, |
50 | | - }, |
51 | | - overlay: { |
52 | | - visible: false, |
53 | | - mode: "local", |
54 | | - input: "", |
55 | | - target: { type: "native" }, |
56 | | - }, |
57 | | - }, |
58 | | - { |
59 | | - workspaces: [], |
60 | | - ui_state: { |
61 | | - open_workspace_ids: [], |
62 | | - active_workspace_id: null, |
63 | | - layout: { |
64 | | - left_width: 320, |
65 | | - right_width: 320, |
66 | | - right_split: 64, |
67 | | - show_code_panel: true, |
68 | | - show_terminal_panel: true, |
69 | | - }, |
70 | | - }, |
71 | | - }, |
72 | | - "en", |
73 | | - defaultAppSettings(), |
74 | | - ); |
75 | | - |
76 | | - assert.equal(next.tabs.length, 0); |
77 | | - assert.equal(next.overlay.visible, false); |
78 | | -}); |
79 | | - |
80 | | -test("bootstrap with zero open workspaces preserves a user-opened launch overlay", () => { |
81 | 32 | const next = buildWorkbenchStateFromBootstrap( |
82 | 33 | { |
83 | 34 | tabs: [], |
@@ -114,53 +65,14 @@ test("bootstrap with zero open workspaces preserves a user-opened launch overlay |
114 | 65 | defaultAppSettings(), |
115 | 66 | ); |
116 | 67 |
|
117 | | - assert.equal(next.tabs.length, 0); |
118 | | - assert.equal(next.overlay.visible, true); |
119 | | - assert.equal(next.overlay.mode, "remote"); |
120 | | - assert.equal(next.overlay.input, "ssh://demo"); |
121 | | - assert.deepEqual(next.overlay.target, { type: "wsl", distro: "Ubuntu" }); |
122 | | -}); |
123 | | - |
124 | | -test("ui state with zero open workspaces keeps the launch overlay hidden", () => { |
125 | | - const next = applyWorkbenchUiState( |
126 | | - { |
127 | | - tabs: [], |
128 | | - activeTabId: "", |
129 | | - layout: { |
130 | | - leftWidth: 320, |
131 | | - rightWidth: 320, |
132 | | - rightSplit: 64, |
133 | | - showCodePanel: true, |
134 | | - showTerminalPanel: true, |
135 | | - }, |
136 | | - overlay: { |
137 | | - visible: false, |
138 | | - mode: "remote", |
139 | | - input: "ssh://demo", |
140 | | - target: { type: "wsl", distro: "Ubuntu" }, |
141 | | - }, |
142 | | - }, |
143 | | - { |
144 | | - open_workspace_ids: [], |
145 | | - active_workspace_id: null, |
146 | | - layout: { |
147 | | - left_width: 320, |
148 | | - right_width: 320, |
149 | | - right_split: 64, |
150 | | - show_code_panel: true, |
151 | | - show_terminal_panel: true, |
152 | | - }, |
153 | | - }, |
154 | | - ); |
155 | | - |
156 | 68 | assert.equal(next.tabs.length, 0); |
157 | 69 | assert.equal(next.overlay.visible, false); |
158 | 70 | assert.equal(next.overlay.mode, "remote"); |
159 | 71 | assert.equal(next.overlay.input, "ssh://demo"); |
160 | 72 | assert.deepEqual(next.overlay.target, { type: "wsl", distro: "Ubuntu" }); |
161 | 73 | }); |
162 | 74 |
|
163 | | -test("ui state with zero open workspaces preserves a user-opened launch overlay", () => { |
| 75 | +test("ui state with zero open workspaces keeps the launch overlay hidden", () => { |
164 | 76 | const next = applyWorkbenchUiState( |
165 | 77 | { |
166 | 78 | tabs: [], |
@@ -193,7 +105,7 @@ test("ui state with zero open workspaces preserves a user-opened launch overlay" |
193 | 105 | ); |
194 | 106 |
|
195 | 107 | assert.equal(next.tabs.length, 0); |
196 | | - assert.equal(next.overlay.visible, true); |
| 108 | + assert.equal(next.overlay.visible, false); |
197 | 109 | assert.equal(next.overlay.mode, "remote"); |
198 | 110 | assert.equal(next.overlay.input, "ssh://demo"); |
199 | 111 | assert.deepEqual(next.overlay.target, { type: "wsl", distro: "Ubuntu" }); |
|
0 commit comments