mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
* test(e2e): harden triaged failures
* test(e2e): ship relay bundle to reusable shards
* test(e2e): tolerate expected IPC closures in daemon shutdown
A normal client exit can close the IPC channel before the finish ack
lands. Distinguish this from real failures by checking error codes,
only throwing if forced cleanup occurred or the error is not an IPC
closure.
* rm doc
* test(e2e): return termination status from legacy close handler
- terminateLegacyCloseClient now returns a discriminated union indicating
whether the process had already exited ('already-exited') or termination
was actually attempted ('termination-attempted')
- Allows finishLegacyCloseClient to only set forcedCleanup when termination
was genuinely needed, not when the process exited cleanly on its own
* test(e2e): fix dispatch contract and voice mic locator
Point the release E2E contract at the renamed build step, and assert the
relabeled microphone through the Voice pane combobox even when Radix
leaves the listbox open.
* test(e2e): add contract test for relay artifact dispatch
Validate that the relay artifact built in CI is properly uploaded,
downloaded, and passed via ORCA_RELAY_PATH to E2E test runs.
* Distinguish between terminated and already-exited processes
Detect when processes have already exited instead of always reporting
termination success. Return booleans from cleanup functions to indicate
whether they actually signalled a process, catch tree-capture failures
when the root process exits before recording completes, and use these
signals to return accurate exit status from termination handlers.
* test(e2e): stabilize file creation and voice microphone tests
Use stable locators (aria-autocomplete, named triggers) and add retry
logic to handle file scans and device events that can interfere with
listbox state. Increase timeouts to allow async operations to complete.
* Add retry logic for transient GitHub API errors in PR body updates
GitHub API occasionally returns transient 5xx errors. Retry up to 3 times
with exponential backoff (1s, 2s, 4s) to improve reliability during
temporary service disruptions. Export updatePullRequest and add sleepImpl
parameter for test injection.
* Add tab search result retention during typing
Keep search results on screen while the deferred query catches up with
the live query. Re-validates results against the current input without
dropping rows prematurely, ensuring the user can select from what they see.
* Add proper types to tab search mock
Replace `unknown` with concrete types (`OpenTabSearchResult`,
`OpenTabSearchEntries`, `SearchableWorkspaceTab`) and use type guards
for discriminated unions to improve test type safety.
70 lines
3.1 KiB
JavaScript
70 lines
3.1 KiB
JavaScript
import { readFileSync } from 'node:fs'
|
|
import { join, resolve } from 'node:path'
|
|
import { describe, expect, it } from 'vitest'
|
|
import { parse } from 'yaml'
|
|
|
|
const projectDir = resolve(import.meta.dirname, '../..')
|
|
const releaseWorkflow = parse(
|
|
readFileSync(join(projectDir, '.github/workflows/release-cut.yml'), 'utf8')
|
|
)
|
|
const e2eWorkflow = parse(readFileSync(join(projectDir, '.github/workflows/e2e.yml'), 'utf8'))
|
|
|
|
describe('release E2E dispatch contract', () => {
|
|
it('dispatches tag-scoped E2E only after publication', () => {
|
|
const dispatchJob = releaseWorkflow.jobs['post-release-e2e']
|
|
const dispatchStep = dispatchJob.steps.find((step) => step.name === 'Dispatch tag-scoped E2E')
|
|
|
|
expect(releaseWorkflow.jobs.e2e).toBeUndefined()
|
|
expect(dispatchJob.needs).toEqual(['cut', 'publish-release'])
|
|
expect(dispatchJob.if).toBe("${{ needs.cut.outputs.tag != '' }}")
|
|
expect(dispatchJob.permissions.actions).toBe('write')
|
|
expect(dispatchStep.env.TAG).toBe('${{ needs.cut.outputs.tag }}')
|
|
expect(dispatchStep.run).toContain('gh workflow run e2e.yml')
|
|
expect(dispatchStep.run).toContain('--ref "$TAG"')
|
|
expect(dispatchStep.run).toContain('--raw-field "ref=refs/tags/$TAG"')
|
|
expect(dispatchStep.run).toContain('for attempt in 1 2 3')
|
|
expect(dispatchStep.run).toContain('[[ "$attempt" -eq 3 ]] || sleep')
|
|
expect(dispatchStep.run).toContain('::warning::Failed to dispatch post-release E2E')
|
|
})
|
|
|
|
it('keeps detached E2E identifiable and manually dispatchable by ref', () => {
|
|
const refInput = e2eWorkflow.on.workflow_dispatch.inputs.ref
|
|
|
|
expect(e2eWorkflow['run-name']).toBe('E2E ${{ inputs.ref || github.ref }}')
|
|
expect(refInput.type).toBe('string')
|
|
expect(refInput.required).toBe(false)
|
|
})
|
|
|
|
it('includes the paired-runtime web client in the shared E2E build artifact', () => {
|
|
const buildStep = e2eWorkflow.jobs.build.steps.find((step) => step.name === 'Build E2E outputs')
|
|
|
|
expect(buildStep.run).toContain('electron-vite build --mode e2e')
|
|
expect(buildStep.env.VITE_EXPOSE_STORE).toBe('true')
|
|
expect(buildStep.run).toContain('pnpm run build:web-from-renderer')
|
|
expect(buildStep.run).toContain('pnpm run build:relay')
|
|
})
|
|
|
|
it('hands the built relay artifact to every E2E run command', () => {
|
|
const uploadStep = e2eWorkflow.jobs.build.steps.find(
|
|
(step) => step.name === 'Upload E2E build output'
|
|
)
|
|
|
|
expect(uploadStep.with.name).toBe('e2e-build-out')
|
|
expect(uploadStep.with.path).toBe('out/')
|
|
|
|
for (const [jobName, runStepName] of [
|
|
['e2e', 'Run E2E tests (${{ matrix.shard_name }})'],
|
|
['changed-e2e', 'Run changed E2E specs']
|
|
]) {
|
|
const job = e2eWorkflow.jobs[jobName]
|
|
const downloadStep = job.steps.find((step) => step.name === 'Download E2E build output')
|
|
const runStep = job.steps.find((step) => step.name === runStepName)
|
|
|
|
expect(job.needs).toBe('build')
|
|
expect(downloadStep.with.name).toBe('e2e-build-out')
|
|
expect(downloadStep.with.path).toBe('out/')
|
|
expect(runStep.run).toContain('ORCA_RELAY_PATH="$GITHUB_WORKSPACE/out/relay"')
|
|
}
|
|
})
|
|
})
|