mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 02:02:42 +00:00
test(app): reproduce cached background workspace visibility loss
A workspace stored with background true is restored with background false. This failing reproduction isolates the cache behavior while investigating the reload assertion tracked in #6805. No production fix is included.
This commit is contained in:
@@ -301,6 +301,19 @@ describe("ReplicaCache", () => {
|
||||
expect(storage.rows.size).toBe(0);
|
||||
});
|
||||
|
||||
it("preserves background visibility when restoring a cached workspace", async () => {
|
||||
const storage = new MemoryStorage();
|
||||
const writer = createCache(storage);
|
||||
const original = directory();
|
||||
original.workspaces.get("workspace-1")!.background = true;
|
||||
commitDirectory(writer, SERVER_ID, original);
|
||||
await writer.flush();
|
||||
|
||||
const reader = createCache(storage);
|
||||
const restored = await reader.readDirectory(SERVER_ID);
|
||||
expect(restored.workspaces.get("workspace-1")?.background).toBe(true);
|
||||
});
|
||||
|
||||
it("round-trips explicit directory and timeline commits", async () => {
|
||||
const storage = new MemoryStorage();
|
||||
const writer = createCache(storage);
|
||||
|
||||
Reference in New Issue
Block a user