mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
test(web): stamp bootstrap artifacts before rebuild checks
This commit is contained in:
1 parent
092ae937b7
commit
d1fb051e0f
2 files changed
+6
-1
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { join } from 'node:path'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { cp, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
|
||||
import { cp, mkdtemp, readFile, rm, stat, utimes, writeFile } from 'node:fs/promises'
|
||||
import { chromium, type Page } from 'playwright'
|
||||
import { expect, it, onTestFailed, onTestFinished } from 'vitest'
|
||||
import {
|
||||
@@ -256,6 +256,10 @@ it('reports bootstrap rebuilds without remounting the settings page or navigatin
|
||||
const originalInput = await draft.elementHandle()
|
||||
let navigations = 0
|
||||
page.on('framenavigated', () => { navigations++ })
|
||||
const clientPath = scaffold.ctx.clientModules.clientPath('@deepseek-ai/dsh-client-modules')!
|
||||
const originalStat = await stat(clientPath)
|
||||
onTestFinished(() => utimes(clientPath, originalStat.atime, originalStat.mtime))
|
||||
await utimes(clientPath, originalStat.atime, new Date(originalStat.mtimeMs + 1_000))
|
||||
scaffold.ctx.clientModules.rebuilt('@deepseek-ai/dsh-client-modules')
|
||||
const failure = page.locator('[data-client-sync-failure]')
|
||||
await failure.getByText(/replacing bootstrap module .* requires a page reload/).waitFor()
|
||||
|
||||
@@ -4,6 +4,7 @@ import { pnpmInvocation } from './pnpm-invocation.ts'
|
||||
|
||||
const serialFiles = [
|
||||
'apps/web/tests/hmr-live.e2e.ts',
|
||||
'apps/web/tests/client-plugin-live.e2e.ts',
|
||||
]
|
||||
const workerRaw = process.env.DSH_WEB_SNAPSHOT_WORKERS
|
||||
const workers = Number.parseInt(workerRaw ?? '', 10)
|
||||
|
||||
Reference in new issue
Block a user