fix(settings, yjs, ux, ci): default settings, y-leveldb restart resilience, dashboard one-click open, delete error handling, Playwright CI

This commit is contained in:
2026-07-27 03:15:30 +02:00
parent 7f8695456c
commit 126277ab94
13 changed files with 129 additions and 45 deletions
+20
View File
@@ -76,6 +76,26 @@ describe('Settings API', () => {
expect(body.value).toBe('test-value');
expect(body.updated_at).toBeDefined();
});
it('should return default CAD settings instead of 404', async () => {
const defaults = [
{ key: 'cad.unit', expected: 'mm' },
{ key: 'cad.gridSize', expected: '20' },
{ key: 'cad.scaleFactor', expected: '1' },
];
for (const { key, expected } of defaults) {
const response = await app.inject({
method: 'GET',
url: `/api/settings/${key}`,
headers: { authorization: `Bearer ${authToken}` },
});
expect(response.statusCode).toBe(200);
const body = JSON.parse(response.body);
expect(body.key).toBe(key);
expect(body.value).toBe(expected);
expect(body.updated_at).toBeDefined();
}
});
});
// ─── Put (upsert) ───────────────────────────────────