mirror of
https://github.com/stablyai/orca.git
synced 2026-10-25 16:03:53 +00:00
* test(e2e): extract paired client window reveal into helper Paired clients launch hidden, parking runtime subscriptions. Playwright-driven clients must be revealed to test actual user interactions. Extract the reveal logic into a reusable helper with error handling and unit tests. * test(e2e): handle crash dialogs and isolate collision fixture IDs - Recover from recoverable UI error dialogs in selectRuntimeHost - Give the same-ID collision fixture unique repo and worktree IDs to avoid reusing the runtime repo's ID, preventing fixture leakage - Simplify verbose comments for clarity
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { assertPairedClientWindowRevealed } from './paired-client-window-reveal'
|
|
|
|
describe('assertPairedClientWindowRevealed', () => {
|
|
it('accepts a window that the reveal made visible', () => {
|
|
expect(() =>
|
|
assertPairedClientWindowRevealed({
|
|
isVisible: true,
|
|
wasVisible: false,
|
|
windowCount: 1
|
|
})
|
|
).not.toThrow()
|
|
})
|
|
|
|
it('accepts a window that was already visible', () => {
|
|
expect(() =>
|
|
assertPairedClientWindowRevealed({
|
|
isVisible: true,
|
|
wasVisible: true,
|
|
windowCount: 1
|
|
})
|
|
).not.toThrow()
|
|
})
|
|
|
|
it('rejects a client with no window instead of letting the spec time out on a click', () => {
|
|
expect(() =>
|
|
assertPairedClientWindowRevealed({
|
|
isVisible: false,
|
|
wasVisible: false,
|
|
windowCount: 0
|
|
})
|
|
).toThrow(/no BrowserWindow/)
|
|
})
|
|
|
|
it('rejects a window that stays hidden after show()', () => {
|
|
expect(() =>
|
|
assertPairedClientWindowRevealed({
|
|
isVisible: false,
|
|
wasVisible: false,
|
|
windowCount: 2
|
|
})
|
|
).toThrow(/stayed hidden after show\(\)/)
|
|
})
|
|
})
|