test(e2e/desktop): first run without the bootstrap marker; chat before the About check
first-run: launch 2 drops .hermes-bootstrap-complete, so a usable install must be recognised off the filesystem (the marker-gated resolver is the sabotage that turns it red), and the chooser assertion runs before the backend count so a red names the chooser. update-concurrency: the About panel replaces the chat view, so the post- update chat turn runs before the panel is opened.
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
* straight to chat — on the first launch and on every later one — and never
|
||||
* show the first-run setup chooser or start the bootstrap installer
|
||||
* (#123888, #123800: the chooser / installer came back on every launch while
|
||||
* the local install was healthy).
|
||||
* the local install was healthy). The second launch drops the Desktop
|
||||
* bootstrap marker first: a usable install is recognised off the filesystem.
|
||||
*
|
||||
* Real entry point: the packaged app the install built, launched with the
|
||||
* install's environment and no HERMES_DESKTOP_HERMES_ROOT override, so the app
|
||||
@@ -66,7 +67,13 @@ test('a healthy local install opens straight to chat on every launch: no setup c
|
||||
|
||||
try {
|
||||
for (const launch of [1, 2]) {
|
||||
await test.step(`launch ${launch}`, async () => {
|
||||
await test.step(launch === 1 ? 'launch 1' : 'launch 2, bootstrap marker absent', async () => {
|
||||
if (launch === 2) {
|
||||
// A usable install the Desktop bootstrap never stamped (a CLI install from before the
|
||||
// marker, or one whose marker was lost): usability, not the marker, decides.
|
||||
fs.rmSync(path.join(facts.checkout, '.hermes-bootstrap-complete'), { force: true })
|
||||
}
|
||||
|
||||
const installer = startInstallerSampler(facts)
|
||||
const { app, page, logTail } = await launchInstalledApp(facts, env)
|
||||
|
||||
@@ -77,6 +84,11 @@ test('a healthy local install opens straight to chat on every launch: no setup c
|
||||
throw new Error(`${(error as Error).message}\n${diagnostics(facts, logTail())}`)
|
||||
})
|
||||
|
||||
expect(
|
||||
await firstRunScreensSeen(page),
|
||||
`launch ${launch} of a healthy install showed the first-run setup chooser\n${diagnostics(facts, logTail())}`
|
||||
).toEqual([])
|
||||
|
||||
// The backend the app started is the user's install, not something it provisioned.
|
||||
const serve = backendServeProcesses(facts)
|
||||
expect(serve.length, `one backend for the install\n${diagnostics(facts)}`).toBe(1)
|
||||
@@ -90,10 +102,6 @@ test('a healthy local install opens straight to chat on every launch: no setup c
|
||||
await send(page, `${U(launch)} hello`, 'Enter', ws)
|
||||
await expect(page.getByText(`${A(launch)} healthy install`)).toBeVisible({ timeout: 120_000 })
|
||||
|
||||
expect(
|
||||
await firstRunScreensSeen(page),
|
||||
`launch ${launch} of a healthy install showed the first-run setup chooser\n${diagnostics(facts, logTail())}`
|
||||
).toEqual([])
|
||||
expect(
|
||||
installer.stop(),
|
||||
`launch ${launch} of a healthy install started the bootstrap installer\n${diagnostics(facts, logTail())}`
|
||||
|
||||
@@ -148,11 +148,12 @@ test('Update now while a terminal update runs is refused, and the panel is truth
|
||||
message: 'the app reports the install current on the new commit'
|
||||
})
|
||||
.toEqual({ currentSha: target, updateAvailable: false })
|
||||
await openAbout(reopened.page)
|
||||
await expect(reopened.page.getByRole('button', { name: /^update now$/i })).toHaveCount(0, { timeout: 60_000 })
|
||||
// Chat first: the About panel replaces the chat view.
|
||||
provider.script(U(1), [{ text: [`${A(1)} `, 'after ', 'terminal ', 'update'] }])
|
||||
await send(reopened.page, `${U(1)} still here?`, 'Enter', ws2)
|
||||
await expect(reopened.page.getByText(`${A(1)} after terminal update`)).toBeVisible({ timeout: 120_000 })
|
||||
await openAbout(reopened.page)
|
||||
await expect(reopened.page.getByRole('button', { name: /^update now$/i })).toHaveCount(0, { timeout: 60_000 })
|
||||
} finally {
|
||||
await closeQuietly(reopened.app)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user