test: update dashboard_layout defaults to include geom/extras (2.8.0 follow-up)

These two assertions asserted the pre-2.8.0 shape; the canvas feature
added geom+extras to the repo/route defaults. push.sh doesn't run unit
tests, so they went red unnoticed until the full vitest run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-10 00:17:48 +10:00
parent c502ccda48
commit 262be3e332
2 changed files with 2 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ describe('dashboard layout api', () => {
it('GET returns defaults', async () => {
const res = await request(app).get('/api/dashboard/layout').set(ownerHeaders);
expect(res.status).toBe(200);
expect(res.body).toEqual({ card_order: [], hidden: [], sizes: {} });
expect(res.body).toEqual({ card_order: [], hidden: [], sizes: {}, geom: {}, extras: [] });
});
it('PUT persists and GET reflects it', async () => {

View File

@@ -8,7 +8,7 @@ beforeAll(async () => { await resetDb(); await migrateUp(); });
describe('dashboard_layout repo', () => {
it('returns defaults when unset', async () => {
const l = await repo.get();
expect(l).toEqual({ card_order: [], hidden: [], sizes: {} });
expect(l).toEqual({ card_order: [], hidden: [], sizes: {}, geom: {}, extras: [] });
});
it('upserts and reads back', async () => {