A reload drew the WAN rows in their listed order, so saved pins other than datavi.be stayed in place and the separator fell under unpinned rows until the first sort, two rounds later. AppState now orders the rows with the same sort the periodic one uses. Model: opus-5-5
This commit is contained in:
1 parent
1e85a210f5
commit
c51e12fba9
2 files changed
+26
-9
No files matched your search
@@ -1107,6 +1107,17 @@ test("after the user sets the interval to 10s, unpins datavi.be and pins GitHub,
|
||||
assert.deepEqual(pinnedNames(after), ["GitHub"]);
|
||||
});
|
||||
|
||||
test("a reload with Google and GitHub pinned starts with them at the top, by name", (t) => {
|
||||
mockStorage(t, { "netwatch-pinned": '["Google","GitHub"]' });
|
||||
|
||||
const state = new AppState([], savedPinnedNames());
|
||||
|
||||
assert.deepEqual(
|
||||
state.wan.slice(0, 2).map((h) => h.name),
|
||||
["GitHub", "Google"],
|
||||
);
|
||||
});
|
||||
|
||||
test("after the user unpins every target, a reload starts with none pinned", (t) => {
|
||||
mockStorage(t, {});
|
||||
const before = new AppState([], savedPinnedNames());
|
||||
|
||||
Reference in new issue
Block a user