summaryrefslogtreecommitdiffhomepage
path: root/src/app/App.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/App.test.ts')
-rw-r--r--src/app/App.test.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/app/App.test.ts b/src/app/App.test.ts
index dcdcb9b..f43a6b8 100644
--- a/src/app/App.test.ts
+++ b/src/app/App.test.ts
@@ -73,6 +73,11 @@ function fakeFetchImpl(): typeof fetch {
status: 200,
});
}
+ if (url.endsWith("/settings/vision")) {
+ return new Response(JSON.stringify({ imageLimit: 10, compactionModel: null }), {
+ status: 200,
+ });
+ }
return new Response(JSON.stringify({ chunks: [], latestSeq: 0 }), { status: 200 });
};
}
@@ -583,4 +588,22 @@ describe("App component interaction tests", () => {
store.dispose();
});
+
+ it("the Vision view renders the vision settings UI (image limit + compaction model)", async () => {
+ const ws = fakeSocket();
+ const store = createAppStore({
+ socketFactory: () => ws,
+ fetchImpl: fakeFetchImpl(),
+ localStorage: createFakeStorageWithViews(["vision"]),
+ });
+ ws.resolveOpen();
+
+ render(App, { props: { store, onNavigate: vi.fn() } });
+
+ // The vision settings load (`GET /settings/vision`) seeds the inputs.
+ expect(await screen.findByLabelText(/Image limit/)).toBeInTheDocument();
+ expect(await screen.findByLabelText(/Compaction model/)).toBeInTheDocument();
+
+ store.dispose();
+ });
});