From c146aa29489ea8bdbe54771a827811bde759fe2e Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Fri, 30 Oct 2026 09:54:12 -0700 Subject: [PATCH] test(workspace): turn the older-images notice on where specs expect it Two System specs read the Sources notice from empty storage, and the new spec read a job list earlier specs had filled. --- tests/browser/workspace-older-images-notice.spec.mjs | 5 +++++ tests/browser/workspace-system.spec.mjs | 3 +++ tests/browser/workspace.spec.mjs | 3 +++ 3 files changed, 11 insertions(+) diff --git a/tests/browser/workspace-older-images-notice.spec.mjs b/tests/browser/workspace-older-images-notice.spec.mjs index e71f8cbb..14568230 100644 --- a/tests/browser/workspace-older-images-notice.spec.mjs +++ b/tests/browser/workspace-older-images-notice.spec.mjs @@ -17,6 +17,11 @@ async function openRoute(page, route) { await expect(page.locator('#workspace-main h1').first()).toBeVisible(); } +// Every spec on this worker's server shares its job list. +test.beforeEach(async ({ request }) => { + await expect(await request.post('/__test__/jobs/restart')).toBeOK(); +}); + test.describe('with the notice not dismissed', () => { test.use({ olderImagesNotice: true }); diff --git a/tests/browser/workspace-system.spec.mjs b/tests/browser/workspace-system.spec.mjs index 6581fe85..98ca5e6a 100644 --- a/tests/browser/workspace-system.spec.mjs +++ b/tests/browser/workspace-system.spec.mjs @@ -897,6 +897,8 @@ test('reset restores defaults without touching other keys', async ({ page }) => // System section, found by role and accessible name (a `term` by its text, a disclosure by its summary). Collapsed // `details` are opened first, so a control inside one counts once it is shown. tests/vendor/legacy-coverage.test.mjs // checks the rest of each row. +test.describe(() => { +test.use({ olderImagesNotice: true }); test('every covered legacy System capability has its native control', async ({ page, request }) => { // Download is offered for a model that is not on disk ("Download again" otherwise): the selected default's file is // missing here. @@ -907,6 +909,7 @@ test('every covered legacy System capability has its native control', async ({ p await request.post('/__test__/tagging/reset', { data: {} }); } }); +}); async function findControls(page) { const covered = readCoverageTable().filter(row => row.Status === 'covered') diff --git a/tests/browser/workspace.spec.mjs b/tests/browser/workspace.spec.mjs index dff63d85..54072923 100644 --- a/tests/browser/workspace.spec.mjs +++ b/tests/browser/workspace.spec.mjs @@ -428,6 +428,8 @@ const SYSTEM_SECTION_LABELS = ['Overview', 'Appearance', 'Sources & scans', 'Int 'Backup & export', 'Diagnostics & logs']; const SYSTEM_HASHES = ['overview', 'appearance', 'sources', 'integrations', 'tagging', 'maintenance', 'backups', 'diagnostics']; +test.describe(() => { +test.use({ olderImagesNotice: true }); test('System is native: the concept shell, section navigation, sections and the Save row', async ({ page }) => { const mutations = []; page.on('request', item => { if (!['GET', 'HEAD', 'OPTIONS'].includes(item.method())) mutations.push(item.url()); }); @@ -506,6 +508,7 @@ test('System is native: the concept shell, section navigation, sections and the await expect(main.locator('.settings-layout')).toHaveCount(1); expect(mutations).toEqual([]); }); +}); test('Overview opens native System from its System card (Q12)', async ({ page }) => { await page.goto(`${workspace}#/overview`);