test(thumbnails): coverage floors for the thumbnail modules and WebP in page workflows
The two new frontend modules enter the coverage baseline (98% lines); other floors only rise. The visual fixture's preview is WebP and Appearance has its Thumbnails surface in the System shell check.
This commit is contained in:
@@ -173,7 +173,8 @@ test('visual fixture exposes real stable media and library records', async ({ re
|
||||
await expect(await request.get(image.url)).toBeOK();
|
||||
const thumbnail = await request.get(image.thumbnail_url);
|
||||
await expect(thumbnail).toBeOK();
|
||||
expect(thumbnail.headers()['content-type']).toBe('image/png');
|
||||
// #317: previews are written as WebP by default.
|
||||
expect(thumbnail.headers()['content-type']).toBe('image/webp');
|
||||
const inspection = await (await request.get(`/prompt_manager/images/inspect/${encodeURIComponent(image.path)}?root=${image.root_index}`)).json();
|
||||
expect(inspection.success).toBe(true);
|
||||
expect(inspection.image.path).toBe(image.path);
|
||||
|
||||
@@ -469,7 +469,7 @@ test('System is native: the concept shell, section navigation, sections, hand-of
|
||||
if (hash === 'overview') await expect(layout.locator(':scope > .summary-metrics')).toBeVisible();
|
||||
if (hash === 'sources') await expect(layout.locator('#source-list .operation')).toHaveCount(2);
|
||||
expect(await layout.evaluate(node => [...node.children].map(child => `${child.localName}.${child.className}`)))
|
||||
.toEqual({ overview: ['div.summary-metrics', 'div.two-col', 'div.save-row'], appearance: ['section.surface', 'div.save-row'],
|
||||
.toEqual({ overview: ['div.summary-metrics', 'div.two-col', 'div.save-row'], appearance: ['section.surface', 'section.surface', 'div.save-row'],
|
||||
sources: ['div.notice', 'section.surface', 'div.save-row'],
|
||||
maintenance: ['div.notice', 'section.surface handoff', 'div.save-row'] }[hash]
|
||||
?? ['section.surface handoff', 'div.save-row']);
|
||||
|
||||
+27
-15
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"admin.js": {
|
||||
"lines": 31,
|
||||
"lines": 32,
|
||||
"branches": 58,
|
||||
"functions": 26,
|
||||
"statements": 31
|
||||
"functions": 27,
|
||||
"statements": 32
|
||||
},
|
||||
"api-client.js": {
|
||||
"lines": 98,
|
||||
@@ -188,7 +188,7 @@
|
||||
"workspace/file-inspector.mjs": {
|
||||
"lines": 96,
|
||||
"branches": 93,
|
||||
"functions": 92,
|
||||
"functions": 93,
|
||||
"statements": 96
|
||||
},
|
||||
"workspace/heading.mjs": {
|
||||
@@ -241,7 +241,7 @@
|
||||
},
|
||||
"workspace/image-tagging.mjs": {
|
||||
"lines": 97,
|
||||
"branches": 90,
|
||||
"branches": 92,
|
||||
"functions": 88,
|
||||
"statements": 97
|
||||
},
|
||||
@@ -338,7 +338,7 @@
|
||||
"workspace/library-location.mjs": {
|
||||
"lines": 94,
|
||||
"branches": 91,
|
||||
"functions": 92,
|
||||
"functions": 93,
|
||||
"statements": 94
|
||||
},
|
||||
"workspace/library-state.mjs": {
|
||||
@@ -372,14 +372,14 @@
|
||||
"statements": 97
|
||||
},
|
||||
"workspace/local-resolver-stages.mjs": {
|
||||
"lines": 94,
|
||||
"lines": 95,
|
||||
"branches": 93,
|
||||
"functions": 98,
|
||||
"statements": 94
|
||||
"statements": 95
|
||||
},
|
||||
"workspace/local-resolver-support.mjs": {
|
||||
"lines": 96,
|
||||
"branches": 80,
|
||||
"branches": 81,
|
||||
"functions": 98,
|
||||
"statements": 96
|
||||
},
|
||||
@@ -426,10 +426,10 @@
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/prompt-blocks.mjs": {
|
||||
"lines": 90,
|
||||
"branches": 92,
|
||||
"lines": 98,
|
||||
"branches": 95,
|
||||
"functions": 98,
|
||||
"statements": 90
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/prompt-inspector.mjs": {
|
||||
"lines": 98,
|
||||
@@ -487,7 +487,7 @@
|
||||
},
|
||||
"workspace/system-controls.mjs": {
|
||||
"lines": 98,
|
||||
"branches": 87,
|
||||
"branches": 89,
|
||||
"functions": 89,
|
||||
"statements": 98
|
||||
},
|
||||
@@ -509,6 +509,12 @@
|
||||
"functions": 98,
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/system-thumbnails.mjs": {
|
||||
"lines": 98,
|
||||
"branches": 95,
|
||||
"functions": 83,
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/system.mjs": {
|
||||
"lines": 98,
|
||||
"branches": 92,
|
||||
@@ -522,10 +528,16 @@
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/thumbnail-review.mjs": {
|
||||
"lines": 96,
|
||||
"lines": 98,
|
||||
"branches": 93,
|
||||
"functions": 98,
|
||||
"statements": 96
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/thumbnail-support.mjs": {
|
||||
"lines": 98,
|
||||
"branches": 98,
|
||||
"functions": 98,
|
||||
"statements": 98
|
||||
},
|
||||
"workspace/toast.mjs": {
|
||||
"lines": 98,
|
||||
|
||||
Reference in New Issue
Block a user