@yuneta/gobj-ui 7.26.48 → 7.26.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -31
- package/dist/gobj-ui.cjs.js +288 -14
- package/dist/gobj-ui.es.js +288 -14
- package/package.json +2 -2
- package/scripts/validate-locales.mjs +734 -76
- package/src/c_yui_form.js +63 -5
- package/src/c_yui_gobj_tree_js.js +37 -4
- package/src/c_yui_shell.js +311 -0
- package/src/form_table_rows.wiring.test.js +32 -0
- package/src/form_time_cell_editor.js +20 -5
- package/src/form_time_cell_editor.test.js +73 -0
- package/src/form_time_field.wiring.test.js +71 -0
- package/src/gobj_tree_camera.wiring.test.js +185 -0
- package/src/overlay_marker_after_back.wiring.test.js +3 -0
- package/src/shell_focus_trap.js +21 -0
- package/src/shell_focus_trap.test.js +52 -0
- package/src/shell_history_debt.wiring.test.js +456 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
/***********************************************************************
|
|
2
|
+
* shell_history_debt.wiring.test.js
|
|
3
|
+
*
|
|
4
|
+
* What a shell that stops with overlays up leaves in the browser
|
|
5
|
+
* history, and who takes it off. Its markers (and the action entry
|
|
6
|
+
* of a `stay` route under one) are dead once it stops: a Back onto
|
|
7
|
+
* one closes nothing. Up to gobj-ui 7.26.48 they stayed, and every
|
|
8
|
+
* logout with an overlay up left more dead Backs (two per cycle with
|
|
9
|
+
* a question over a panel). The stopped shell moves no history -- it
|
|
10
|
+
* would not hear the landing --; the next shell takes them off at its
|
|
11
|
+
* start, with one history.go(-n) heard by its own expected_pops.
|
|
12
|
+
*
|
|
13
|
+
* The history here is a model of a browser's session history with
|
|
14
|
+
* the Navigation API: a list and an index, each entry with a key that
|
|
15
|
+
* a replaceState keeps and a push makes new, pushState truncating
|
|
16
|
+
* what is ahead, and a traversal (back(), go()) run on a later task
|
|
17
|
+
* from whatever entry is current THEN. Real browsers: qa-history
|
|
18
|
+
* cases (h) to (l).
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) 2026, ArtGins.
|
|
21
|
+
* All Rights Reserved.
|
|
22
|
+
***********************************************************************/
|
|
23
|
+
import {describe, test, expect, beforeAll, beforeEach, afterEach} from "vitest";
|
|
24
|
+
import {install_dom_double} from "../test/dom_double.js";
|
|
25
|
+
|
|
26
|
+
install_dom_double();
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
SDATA, SDATA_END, data_type_t, gclass_create, gobj_write_attr,
|
|
30
|
+
gobj_start_up, gobj_create_yuno, gobj_create, gobj_start, gobj_stop,
|
|
31
|
+
gobj_destroy, gobj_is_running,
|
|
32
|
+
set_log_callback,
|
|
33
|
+
} = await import("@yuneta/gobj-js");
|
|
34
|
+
const {register_c_yui_shell, yui_shell_unpark_route, yui_shell_register_overlay,
|
|
35
|
+
yui_shell_overlay_dismissed} = await import("./c_yui_shell.js");
|
|
36
|
+
const {yui_shell_show_modal, yui_shell_confirm_yesno} = await import("./shell_modals.js");
|
|
37
|
+
|
|
38
|
+
const logged = [];
|
|
39
|
+
let yuno = null;
|
|
40
|
+
let key_seq = 0;
|
|
41
|
+
const shells = [];
|
|
42
|
+
|
|
43
|
+
const session = {entries: [], index: 0, gos: []};
|
|
44
|
+
|
|
45
|
+
function url_hash(url)
|
|
46
|
+
{
|
|
47
|
+
return (typeof url === "string" && url.includes("#"))?
|
|
48
|
+
url.slice(url.indexOf("#")) : null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function new_entry(state, hash)
|
|
52
|
+
{
|
|
53
|
+
key_seq++;
|
|
54
|
+
return {state: state, hash: hash, key: `k${key_seq}`};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function install_history_model(with_navigation)
|
|
58
|
+
{
|
|
59
|
+
session.entries = [new_entry(null, window.location.hash)];
|
|
60
|
+
session.index = 0;
|
|
61
|
+
session.gos = [];
|
|
62
|
+
window.history = {
|
|
63
|
+
get state() {
|
|
64
|
+
return session.entries[session.index].state;
|
|
65
|
+
},
|
|
66
|
+
get length() {
|
|
67
|
+
return session.entries.length;
|
|
68
|
+
},
|
|
69
|
+
pushState(state, title, url) {
|
|
70
|
+
const h = url_hash(url);
|
|
71
|
+
if(h !== null) {
|
|
72
|
+
window.location.hash = h;
|
|
73
|
+
}
|
|
74
|
+
session.entries.splice(session.index + 1);
|
|
75
|
+
session.entries.push(new_entry(state, window.location.hash));
|
|
76
|
+
session.index++;
|
|
77
|
+
},
|
|
78
|
+
replaceState(state, title, url) {
|
|
79
|
+
const h = url_hash(url);
|
|
80
|
+
if(h !== null) {
|
|
81
|
+
window.location.hash = h;
|
|
82
|
+
}
|
|
83
|
+
const e = session.entries[session.index];
|
|
84
|
+
e.state = state;
|
|
85
|
+
e.hash = window.location.hash;
|
|
86
|
+
},
|
|
87
|
+
back() {
|
|
88
|
+
this.go(-1);
|
|
89
|
+
},
|
|
90
|
+
forward() {
|
|
91
|
+
},
|
|
92
|
+
go(delta) {
|
|
93
|
+
session.gos.push(delta);
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
const to = session.index + delta;
|
|
96
|
+
if(to >= 0 && to < session.entries.length) {
|
|
97
|
+
traverse_to(to);
|
|
98
|
+
}
|
|
99
|
+
}, 0);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
if(with_navigation) {
|
|
103
|
+
window.navigation = {
|
|
104
|
+
get currentEntry() {
|
|
105
|
+
const e = session.entries[session.index];
|
|
106
|
+
return {key: e.key, index: session.index};
|
|
107
|
+
},
|
|
108
|
+
entries() {
|
|
109
|
+
return session.entries.map((e, i) => ({
|
|
110
|
+
key: e.key, index: i, url: `http://localhost/${e.hash}`
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
} else {
|
|
115
|
+
delete window.navigation;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function traverse_to(index)
|
|
120
|
+
{
|
|
121
|
+
const left = window.location.hash;
|
|
122
|
+
session.index = index;
|
|
123
|
+
window.location.hash = session.entries[index].hash;
|
|
124
|
+
const ev = new Event("popstate");
|
|
125
|
+
ev.state = window.history.state;
|
|
126
|
+
window.dispatchEvent(ev);
|
|
127
|
+
if(session.entries[index].hash !== left) {
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
window.dispatchEvent(new Event("hashchange"));
|
|
130
|
+
}, 0);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function user_back()
|
|
135
|
+
{
|
|
136
|
+
traverse_to(session.index - 1);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function next_task()
|
|
140
|
+
{
|
|
141
|
+
return new Promise(resolve => setTimeout(resolve, 0));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
async function settle()
|
|
145
|
+
{
|
|
146
|
+
for(let i = 0; i < 4; i++) {
|
|
147
|
+
await next_task();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
beforeAll(async () => {
|
|
152
|
+
const i18next = (await import("i18next")).default;
|
|
153
|
+
await i18next.init({lng: "en", resources: {}});
|
|
154
|
+
gobj_start_up(null, null, null, null, null, null, null);
|
|
155
|
+
set_log_callback((level, msg) => {
|
|
156
|
+
logged.push({level: String(level), msg: String(msg)});
|
|
157
|
+
});
|
|
158
|
+
gclass_create("C_TEST_DEBT_HOST", [], [["ST_IDLE", []]], {}, 0, [SDATA_END()], {}, 0, 0, 0, 0);
|
|
159
|
+
gclass_create(
|
|
160
|
+
"C_TEST_DEBT_VIEW", [], [["ST_IDLE", []]], {
|
|
161
|
+
mt_create: (gobj) => {
|
|
162
|
+
gobj_write_attr(gobj, "$container", document.createElement("div"));
|
|
163
|
+
}
|
|
164
|
+
}, 0, [
|
|
165
|
+
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "view root"),
|
|
166
|
+
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "subscriber"),
|
|
167
|
+
SDATA_END()
|
|
168
|
+
], {}, 0, 0, 0, 0
|
|
169
|
+
);
|
|
170
|
+
register_c_yui_shell();
|
|
171
|
+
yuno = gobj_create_yuno("debt_yuno", "C_TEST_DEBT_HOST", {});
|
|
172
|
+
gobj_start(yuno);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
beforeEach(() => {
|
|
176
|
+
logged.length = 0;
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
afterEach(async () => {
|
|
180
|
+
await settle();
|
|
181
|
+
for(const sh of shells.splice(0)) {
|
|
182
|
+
if(gobj_is_running(sh)) {
|
|
183
|
+
gobj_stop(sh);
|
|
184
|
+
}
|
|
185
|
+
gobj_destroy(sh);
|
|
186
|
+
}
|
|
187
|
+
/* What a test left for the next shell is not the next test's. */
|
|
188
|
+
install_history_model(true);
|
|
189
|
+
const sh = new_shell();
|
|
190
|
+
await settle();
|
|
191
|
+
gobj_stop(sh);
|
|
192
|
+
gobj_destroy(sh);
|
|
193
|
+
shells.splice(0);
|
|
194
|
+
window.location.hash = "";
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
function routed_config()
|
|
198
|
+
{
|
|
199
|
+
const target = {stage: "main", gclass: "C_TEST_DEBT_VIEW", kw: {}};
|
|
200
|
+
return {
|
|
201
|
+
shell: {
|
|
202
|
+
zones: {center: {host: "stage.main"}},
|
|
203
|
+
stages: {main: {zone: "center", default_route: "/home"}}
|
|
204
|
+
},
|
|
205
|
+
menu: {
|
|
206
|
+
primary: {
|
|
207
|
+
items: [
|
|
208
|
+
{id: "prev", route: "/prev", target: target},
|
|
209
|
+
{id: "home", route: "/home", target: target},
|
|
210
|
+
{id: "prefs", route: "/prefs",
|
|
211
|
+
target: {kind: "action", event: "EV_OPEN_PREFS", redirect: "stay"}}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
let seq = 0;
|
|
219
|
+
function new_shell()
|
|
220
|
+
{
|
|
221
|
+
seq++;
|
|
222
|
+
const app = gobj_create(`dapp${seq}`, "C_TEST_DEBT_HOST", {}, yuno);
|
|
223
|
+
gobj_start(app);
|
|
224
|
+
const shell = gobj_create(`dshell${seq}`, "C_YUI_SHELL",
|
|
225
|
+
{config: routed_config(), subscriber: app}, app);
|
|
226
|
+
gobj_start(shell);
|
|
227
|
+
shells.push(shell);
|
|
228
|
+
return shell;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function stop_shell(shell)
|
|
232
|
+
{
|
|
233
|
+
gobj_stop(shell);
|
|
234
|
+
gobj_destroy(shell);
|
|
235
|
+
shells.splice(shells.indexOf(shell), 1);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* The test app declares no route event: what the shell says is what
|
|
239
|
+
* these tests read. */
|
|
240
|
+
function shell_warnings()
|
|
241
|
+
{
|
|
242
|
+
return logged.filter((l) => l.level === "warning" || l.level === "error")
|
|
243
|
+
.map((l) => l.msg).filter((m) => m.includes("C_YUI_SHELL"));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Back from here to the first entry, counting the DEAD Backs: a landing
|
|
247
|
+
* on an entry that no live overlay owns and that is on the same hash as
|
|
248
|
+
* the one left (nothing on screen changes). */
|
|
249
|
+
async function count_backs_to_start(open_overlay)
|
|
250
|
+
{
|
|
251
|
+
let backs = 0;
|
|
252
|
+
let dead = 0;
|
|
253
|
+
while(session.index > 0) {
|
|
254
|
+
const hash = window.location.hash;
|
|
255
|
+
const was_open = open_overlay();
|
|
256
|
+
user_back();
|
|
257
|
+
await settle();
|
|
258
|
+
backs++;
|
|
259
|
+
if(window.location.hash === hash && was_open === open_overlay()) {
|
|
260
|
+
dead++;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return {backs, dead};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
describe("a shell stopped with overlays up leaves its markers to the next one", () => {
|
|
267
|
+
test("three logouts with a question over a panel: the next shell takes the dead markers off", async () => {
|
|
268
|
+
window.location.hash = "#/prev";
|
|
269
|
+
install_history_model(true);
|
|
270
|
+
window.history.pushState(null, "", "#/home");
|
|
271
|
+
let shell = new_shell();
|
|
272
|
+
let open = null;
|
|
273
|
+
|
|
274
|
+
for(let cycle = 0; cycle < 3; cycle++) {
|
|
275
|
+
const panel = yui_shell_register_overlay(shell, () => {
|
|
276
|
+
open = null;
|
|
277
|
+
}, {keep_on_navigate: true});
|
|
278
|
+
expect(panel).not.toBe(null);
|
|
279
|
+
open = panel;
|
|
280
|
+
await settle();
|
|
281
|
+
yui_shell_confirm_yesno(shell, "log out?"); // answered by the stop
|
|
282
|
+
expect(session.entries.length).toBeGreaterThanOrEqual(4);
|
|
283
|
+
stop_shell(shell);
|
|
284
|
+
/* The stopped shell moves nothing. */
|
|
285
|
+
expect(session.gos).toEqual([]);
|
|
286
|
+
open = null;
|
|
287
|
+
shell = new_shell();
|
|
288
|
+
await settle();
|
|
289
|
+
/* ONE traversal took both dead markers off. */
|
|
290
|
+
expect(session.gos).toEqual([-2]);
|
|
291
|
+
expect(session.entries[session.index].hash).toBe("#/home");
|
|
292
|
+
expect(session.index).toBe(1);
|
|
293
|
+
session.gos = [];
|
|
294
|
+
}
|
|
295
|
+
const panel = yui_shell_register_overlay(shell, () => {
|
|
296
|
+
open = null;
|
|
297
|
+
});
|
|
298
|
+
open = panel;
|
|
299
|
+
expect(session.index).toBe(2);
|
|
300
|
+
const r = await count_backs_to_start(() => open !== null);
|
|
301
|
+
expect(r).toEqual({backs: 2, dead: 0});
|
|
302
|
+
expect(open).toBe(null);
|
|
303
|
+
expect(shell_warnings()).toEqual([]);
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
test("an overlay opened while the dead markers go waits for the landing", async () => {
|
|
307
|
+
window.location.hash = "#/home";
|
|
308
|
+
install_history_model(true);
|
|
309
|
+
let shell = new_shell();
|
|
310
|
+
yui_shell_show_modal(shell, "the sheet", {dialog: true, title: "settings"});
|
|
311
|
+
stop_shell(shell);
|
|
312
|
+
|
|
313
|
+
shell = new_shell();
|
|
314
|
+
let closed = 0;
|
|
315
|
+
/* In the same turn as the start: the go(-1) is in flight. */
|
|
316
|
+
const panel = yui_shell_register_overlay(shell, () => {
|
|
317
|
+
closed++;
|
|
318
|
+
});
|
|
319
|
+
expect(panel.marker_pending).toBe(true);
|
|
320
|
+
expect(session.entries.length).toBe(2);
|
|
321
|
+
await settle();
|
|
322
|
+
expect(panel.marker_pending).toBe(false);
|
|
323
|
+
expect(session.index).toBe(1);
|
|
324
|
+
expect(window.history.state.__yui_overlay__).toBe(panel.id);
|
|
325
|
+
|
|
326
|
+
user_back();
|
|
327
|
+
await settle();
|
|
328
|
+
expect(closed).toBe(1);
|
|
329
|
+
expect(session.index).toBe(0);
|
|
330
|
+
expect(shell_warnings()).toEqual([]);
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
test("the action entry of a `stay` route parked under an overlay goes too", async () => {
|
|
334
|
+
window.location.hash = "#/prev";
|
|
335
|
+
install_history_model(true);
|
|
336
|
+
window.history.pushState(null, "", "#/home");
|
|
337
|
+
let shell = new_shell();
|
|
338
|
+
/* A click on the action route: a push, then the action opens the
|
|
339
|
+
* overlay, and its close takes the URL off the route. */
|
|
340
|
+
window.history.pushState(null, "", "#/prefs");
|
|
341
|
+
window.dispatchEvent(new Event("hashchange"));
|
|
342
|
+
yui_shell_show_modal(shell, "the prefs", {
|
|
343
|
+
dialog: true, title: "preferences",
|
|
344
|
+
on_close: () => {
|
|
345
|
+
yui_shell_unpark_route("/prefs");
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
expect(session.entries.map(e => e.hash)).toEqual(["#/prev", "#/home", "#/prefs", "#/prefs"]);
|
|
349
|
+
stop_shell(shell);
|
|
350
|
+
expect(window.location.hash).toBe("#/home"); // rewritten in place (7.26.48)
|
|
351
|
+
|
|
352
|
+
shell = new_shell();
|
|
353
|
+
await settle();
|
|
354
|
+
expect(session.gos).toEqual([-2]);
|
|
355
|
+
expect(session.index).toBe(1);
|
|
356
|
+
expect(window.location.hash).toBe("#/home");
|
|
357
|
+
user_back();
|
|
358
|
+
await settle();
|
|
359
|
+
expect(window.location.hash).toBe("#/prev");
|
|
360
|
+
expect(shell_warnings()).toEqual([]);
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
test("a back() of the stopped shell still in flight is adopted, not run over", async () => {
|
|
364
|
+
window.location.hash = "#/home";
|
|
365
|
+
install_history_model(true);
|
|
366
|
+
let shell = new_shell();
|
|
367
|
+
const first = yui_shell_register_overlay(shell, () => {});
|
|
368
|
+
/* Closed by a control of its own: its back() is in flight when
|
|
369
|
+
* the shell stops, in the same turn. */
|
|
370
|
+
yui_shell_overlay_dismissed(shell, first);
|
|
371
|
+
expect(session.gos).toEqual([-1]);
|
|
372
|
+
stop_shell(shell);
|
|
373
|
+
|
|
374
|
+
shell = new_shell();
|
|
375
|
+
let closed = 0;
|
|
376
|
+
const panel = yui_shell_register_overlay(shell, () => {
|
|
377
|
+
closed++;
|
|
378
|
+
});
|
|
379
|
+
expect(panel.marker_pending).toBe(true);
|
|
380
|
+
await settle();
|
|
381
|
+
/* No second traversal: the dead marker was the one the back()
|
|
382
|
+
* took off. */
|
|
383
|
+
expect(session.gos).toEqual([-1]);
|
|
384
|
+
expect(session.index).toBe(1);
|
|
385
|
+
expect(window.history.state.__yui_overlay__).toBe(panel.id);
|
|
386
|
+
user_back();
|
|
387
|
+
await settle();
|
|
388
|
+
expect(closed).toBe(1);
|
|
389
|
+
expect(session.index).toBe(0);
|
|
390
|
+
expect(shell_warnings()).toEqual([]);
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
test("nothing goes past an entry of the reader's", async () => {
|
|
394
|
+
window.location.hash = "#/home";
|
|
395
|
+
install_history_model(true);
|
|
396
|
+
let shell = new_shell();
|
|
397
|
+
yui_shell_register_overlay(shell, () => {}, {keep_on_navigate: true});
|
|
398
|
+
/* A link with the panel up: the marker is buried under it. */
|
|
399
|
+
window.history.pushState(null, "", "#/prev");
|
|
400
|
+
window.dispatchEvent(new Event("hashchange"));
|
|
401
|
+
await settle();
|
|
402
|
+
stop_shell(shell);
|
|
403
|
+
shell = new_shell();
|
|
404
|
+
await settle();
|
|
405
|
+
expect(session.gos).toEqual([]);
|
|
406
|
+
expect(session.index).toBe(2);
|
|
407
|
+
expect(shell_warnings()).toEqual([]);
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
test("an entry a deep link rewrites to the resting route is no longer dead", async () => {
|
|
411
|
+
window.location.hash = "#/home";
|
|
412
|
+
install_history_model(true);
|
|
413
|
+
let shell = new_shell();
|
|
414
|
+
yui_shell_register_overlay(shell, () => {});
|
|
415
|
+
/* The URL left on the action route (an app that does not unpark),
|
|
416
|
+
* and a stop: the marker is dead. */
|
|
417
|
+
window.history.replaceState(window.history.state, "", "#/prefs");
|
|
418
|
+
stop_shell(shell);
|
|
419
|
+
|
|
420
|
+
/* The next shell reads #/prefs with no resting view: it rewrites
|
|
421
|
+
* that entry to the resting route and pushes the action again. */
|
|
422
|
+
shell = new_shell();
|
|
423
|
+
await settle();
|
|
424
|
+
expect(session.entries.map(e => e.hash)).toEqual(["#/home", "#/home", "#/prefs"]);
|
|
425
|
+
expect(session.gos).toEqual([]);
|
|
426
|
+
/* The overlay of the action, and a logout with it up. */
|
|
427
|
+
yui_shell_show_modal(shell, "the prefs", {
|
|
428
|
+
dialog: true, title: "preferences",
|
|
429
|
+
on_close: () => {
|
|
430
|
+
yui_shell_unpark_route("/prefs");
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
stop_shell(shell);
|
|
434
|
+
|
|
435
|
+
/* Its marker and the action entry are dead; the entry under them
|
|
436
|
+
* is the resting view, and stays. */
|
|
437
|
+
shell = new_shell();
|
|
438
|
+
await settle();
|
|
439
|
+
expect(session.gos).toEqual([-2]);
|
|
440
|
+
expect(session.index).toBe(1);
|
|
441
|
+
expect(shell_warnings()).toEqual([]);
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
test("without the Navigation API nothing moves, as before", async () => {
|
|
445
|
+
window.location.hash = "#/home";
|
|
446
|
+
install_history_model(false);
|
|
447
|
+
let shell = new_shell();
|
|
448
|
+
yui_shell_show_modal(shell, "the sheet", {dialog: true, title: "settings"});
|
|
449
|
+
stop_shell(shell);
|
|
450
|
+
shell = new_shell();
|
|
451
|
+
await settle();
|
|
452
|
+
expect(session.gos).toEqual([]);
|
|
453
|
+
expect(session.entries.length).toBe(2);
|
|
454
|
+
expect(shell_warnings()).toEqual([]);
|
|
455
|
+
});
|
|
456
|
+
});
|