From 35db77508c7cb37a6554eed7db604d339e074fc2 Mon Sep 17 00:00:00 2001 From: creatixchu Date: Fri, 13 Nov 2026 14:58:57 +0800 Subject: [PATCH] test(cua): exercise the real inventory service on macOS --- apps/web/tests/cua-permissions.e2e.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/tests/cua-permissions.e2e.ts b/apps/web/tests/cua-permissions.e2e.ts index 1b83ab6bf9..a74d37b2a4 100644 --- a/apps/web/tests/cua-permissions.e2e.ts +++ b/apps/web/tests/cua-permissions.e2e.ts @@ -349,10 +349,10 @@ it.skipIf(process.platform !== 'darwin' && process.platform !== 'win32')('shows profile: { packages: [{ dir: bundle, enabled: true }] }, extraOverlayPath: patch, }) if (process.platform === 'darwin') { - // Substitute only the enabled Windows provider in the Host response. The Client must reach the real inventory Remote. - const inventory = await scaffold.ctx.pluginInventory.list() - vi.spyOn(scaffold.ctx.pluginInventory, 'list').mockResolvedValue({ ...inventory, entries: inventory.entries.map(entry => - entry.moduleName === '@deepseek-ai/dsh-cua-windows' ? { ...entry, enabled: true, fiberPhase: 'failed' } : entry) }) + // The Host inventory reads this Loader flag; only the platform-specific input is substituted on macOS. + const windows = [...scaffold.ctx.loader.entries()].find(entry => entry.options.id === 'cua-windows') + if (!windows) throw new Error('CUA bundle has no Windows provider row') + vi.spyOn(windows, 'disabled', 'get').mockReturnValue(false) } const browser = resources.browser = await chromium.launch() const page = await newEnglishPage(browser)