diff options
| author | Adam Malczewski <[email protected]> | 2026-08-02 13:49:14 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-08-02 13:49:14 +0900 |
| commit | 42cada78db1e58947074f12dcf7c8e41fc501b40 (patch) | |
| tree | b3a2c70c9cf8ea2046ed93999cecd65edc840e2c /src/app/App.test.ts | |
| parent | 65ebbef310b619251cccf55b6c13a94d7b9538da (diff) | |
| download | dispatch-web-42cada78db1e58947074f12dcf7c8e41fc501b40.tar.gz dispatch-web-42cada78db1e58947074f12dcf7c8e41fc501b40.zip | |
feat(vision): add dedicated Vision settings view, move vision model setting out of Compaction
Diffstat (limited to 'src/app/App.test.ts')
| -rw-r--r-- | src/app/App.test.ts | 23 |
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(); + }); }); |
