test(e2e): stabilize triaged release failures (#14242)

* test(e2e): stabilize triaged release failures

* rm file
This commit is contained in:
Jinjing
2026-08-13 08:58:04 -07:00
committed by GitHub
parent 93334dc53f
commit 1d2b8c7f42
6 changed files with 28 additions and 22 deletions
@@ -125,9 +125,9 @@ const MAX_WORST_KEY_LATENCY_MS = 300
// whichever synthetic flush it collides with, so on a CPU-starved OSS shard it
// is environment-dominated (seen at ~3.1s) even when typing stays instant. The
// median (75ms) is the real responsiveness guard; keep worst-under-load only as
// a catastrophic-hang detector. Mirrors ssh-docker-relay-perf's 2s worst-key
// tolerance and the hidden-pressure scenario's relaxed worst budget.
const MAX_WORST_KEY_LATENCY_UNDER_LOAD_MS = 3_000
// a catastrophic-hang detector. Leave CI headroom above the observed ~3.1s
// scheduler overrun while still surfacing multi-second renderer stalls.
const MAX_WORST_KEY_LATENCY_UNDER_LOAD_MS = 3_500
// Why: the post-revisit printf is sampled while the background panes are still
// ACK-gate-held and through a whole-buffer serialize poll, so it inherits the
// same environment-dominated worst-case as typing under load; the unloaded
+4 -4
View File
@@ -150,15 +150,15 @@ test.describe('Agent awake setting', () => {
name: 'Keep computer awake'
})
const offMode = keepAwakeModes.getByRole('radio', { name: 'Off' })
const autoMode = keepAwakeModes.getByRole('radio', { name: 'Auto' })
const agentMode = keepAwakeModes.getByRole('radio', { name: 'Agent' })
await expect(offMode).toHaveAttribute('aria-checked', 'true')
await autoMode.click()
await expect(autoMode).toHaveAttribute('aria-checked', 'true')
await agentMode.click()
await expect(agentMode).toHaveAttribute('aria-checked', 'true')
await expect
.poll(async () => (await getSettings(orcaPage)).computerAwakeMode, {
timeout: 5_000,
message: 'keep-awake mode did not persist after selecting Auto'
message: 'keep-awake mode did not persist after selecting Agent'
})
.toBe('auto')
+1 -1
View File
@@ -138,8 +138,8 @@ test.describe('SSH config host picker', () => {
await form.getByRole('button', { name: 'Save' }).click()
await expect(form).toBeHidden({ timeout: 10_000 })
await expect(orcaPage.getByText('SSH host added.')).toBeVisible({ timeout: 5_000 })
// The saved settings card is durable; the success toast is not.
const sshSection = await openSshHostSettings(orcaPage)
await expectSshHostListedInSettings(sshSection, prod)
})
+11 -11
View File
@@ -28,7 +28,7 @@ async function postCodexHookEvent(
expect(response.status).toBe(204)
}
test('shows Caffeinate mode and Auto activity in the status bar', async ({
test('shows Caffeinate mode and Agent activity in the status bar', async ({
electronApp,
orcaPage
}) => {
@@ -39,26 +39,26 @@ test('shows Caffeinate mode and Auto activity in the status bar', async ({
await expect(offStatus).toHaveText('Off')
await offStatus.click()
await expect(orcaPage.getByRole('menuitemradio', { name: /^On/ })).toBeVisible()
await expect(orcaPage.getByRole('menuitemradio', { name: /^Auto/ })).toBeVisible()
await expect(orcaPage.getByRole('menuitemradio', { name: /^Agent/ })).toBeVisible()
await expect(orcaPage.getByRole('menuitemradio', { name: /^Off/ })).toBeVisible()
const menuProofPath = process.env.ORCA_CAFFEINATE_MENU_PROOF_PATH
if (menuProofPath) {
await orcaPage.screenshot({ path: menuProofPath })
}
await orcaPage.getByRole('menuitemradio', { name: /^Auto/ }).click()
await orcaPage.getByRole('menuitemradio', { name: /^Agent/ }).click()
const autoInactiveStatus = orcaPage.getByRole('button', {
name: 'Caffeinate, Auto · Inactive'
const agentInactiveStatus = orcaPage.getByRole('button', {
name: 'Caffeinate, Agent · Inactive'
})
await expect(autoInactiveStatus).toBeVisible()
await expect(agentInactiveStatus).toBeVisible()
const paneKey = `e2e-caffeinate-tab:${randomUUID()}`
await postCodexHookEvent(electronApp, paneKey, 'UserPromptSubmit')
const autoActiveStatus = orcaPage.getByRole('button', {
name: 'Caffeinate, Auto · Active'
const agentActiveStatus = orcaPage.getByRole('button', {
name: 'Caffeinate, Agent · Active'
})
await expect(autoActiveStatus).toBeVisible()
await expect(autoActiveStatus).toHaveText('Auto')
await expect(agentActiveStatus).toBeVisible()
await expect(agentActiveStatus).toHaveText('Agent')
const proofPath = process.env.ORCA_CAFFEINATE_PROOF_PATH
if (proofPath) {
@@ -66,5 +66,5 @@ test('shows Caffeinate mode and Auto activity in the status bar', async ({
}
await postCodexHookEvent(electronApp, paneKey, 'Stop')
await expect(autoInactiveStatus).toBeVisible()
await expect(agentInactiveStatus).toBeVisible()
})
@@ -18,6 +18,7 @@ import {
waitForPaneIdentitySnapshot
} from './helpers/terminal'
import { parkHiddenTabBehindDecoy, waitForTabParked } from './helpers/terminal-hidden-parking'
import { TERMINAL_TAB_PARK_FLIP_BURST_WINDOW_MS } from '../../src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry'
// Why: the parking wiring registers this handle (dev/exposeStore builds only)
// so tests can detect that hidden-view parking is compiled in and which delay
@@ -40,6 +41,7 @@ test.use({
const PARKED_FRAME_SCRIPT_DELAY_MS = 750
const PARKED_FRAME_COUNT = 25
const PARK_VERDICT_BURST_SETTLE_MS = TERMINAL_TAB_PARK_FLIP_BURST_WINDOW_MS * 4
function parkedTuiFrame(runId: string, frame: number): string {
const progress = `${'█'.repeat((frame % 8) + 1)}${'░'.repeat(8 - ((frame % 8) + 1))}`
@@ -531,6 +533,9 @@ test.describe('Terminal hidden view parking', () => {
const CYCLES = 25
const mismatches: string[] = []
for (let cycle = 1; cycle < CYCLES; cycle++) {
// Why: each cycle intentionally flips this tab's rendered verdict twice.
// Let the production anti-churn burst window lapse before the next one.
await orcaPage.waitForTimeout(PARK_VERDICT_BURST_SETTLE_MS)
const rows = await runOneParkRevealCycle(cycle)
if (JSON.stringify(rows) !== JSON.stringify(referenceRows)) {
mismatches.push(
+4 -3
View File
@@ -116,7 +116,8 @@ test.describe('Voice microphone selection', () => {
const microphone = orcaPage.getByRole('combobox', { name: 'Microphone' })
await expect(microphone).toHaveText('System default')
await microphone.click()
// Settings can still be animating; keyboard activation does not depend on its position.
await microphone.press('Space')
await expect(orcaPage.getByRole('option', { name: 'USB Microphone' })).toBeVisible()
await orcaPage.getByRole('option', { name: 'USB Microphone' }).click()
@@ -147,7 +148,7 @@ test.describe('Voice microphone selection', () => {
await prepareVoiceSettings(orcaPage, 'stale-airpods-id', 'AirPods')
const microphone = orcaPage.getByRole('combobox', { name: 'Microphone' })
await microphone.click()
await microphone.press('Space')
await expect(orcaPage.getByRole('option', { name: 'AirPods (unavailable)' })).toBeVisible()
await orcaPage.keyboard.press('Escape')
@@ -165,7 +166,7 @@ test.describe('Voice microphone selection', () => {
})
await expect(microphone).toHaveText('AirPods')
await microphone.click()
await microphone.press('Space')
await expect(orcaPage.getByRole('option', { name: 'AirPods' })).toBeVisible()
await expect(orcaPage.getByRole('option', { name: 'AirPods (unavailable)' })).toHaveCount(0)
await orcaPage.keyboard.press('Escape')