From d8548c6954ff66545fc999e8f3775d42b73cfba6 Mon Sep 17 00:00:00 2001 From: yoho Date: Tue, 17 Jan 2023 15:38:56 +0800 Subject: [PATCH] fix(ui): don't show "connecting" screen in html reporter (#2693) --- packages/ui/client/composables/client/index.ts | 2 +- packages/ui/vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/client/composables/client/index.ts b/packages/ui/client/composables/client/index.ts index bc0da8be71c1..8fe4571fb8bb 100644 --- a/packages/ui/client/composables/client/index.ts +++ b/packages/ui/client/composables/client/index.ts @@ -66,7 +66,7 @@ export function runCurrent() { watch( () => client.ws, (ws) => { - status.value = 'CONNECTING' + status.value = isReport ? 'OPEN' : 'CONNECTING' ws.addEventListener('open', async () => { status.value = 'OPEN' diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index b4055d541cff..46c3ed0a9cf7 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -11,7 +11,7 @@ import { presetAttributify, presetIcons, presetUno } from 'unocss' // for debug: // open a static file serve to share the report json // and ui using the link to load the report json data -const debugLink = 'http://127.0.0.1:4173' +const debugLink = 'http://127.0.0.1:4173/__vitest__' export const config: UserConfig = { root: __dirname,