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:
@@ -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) ───────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user