mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 00:04:01 +00:00
test(terminal): repoint the STA-5505 window-close scope pin at its new file
The confirmNativeWindowClose block moved out of Terminal.tsx with the rest of the prompt; the source-text pin followed it, with an indent anchor so a nested copy cannot satisfy it.
This commit is contained in:
@@ -190,10 +190,13 @@ describe('createShutdownCheckpointGuard', () => {
|
||||
|
||||
it('runs the quit checkpoint inside the window-close scope and surfaces a vetoed quit (STA-5505/#15352)', () => {
|
||||
const source = readFileSync(
|
||||
join(process.cwd(), 'src/renderer/src/components/Terminal.tsx'),
|
||||
join(
|
||||
process.cwd(),
|
||||
'src/renderer/src/components/terminal/window-close-running-process-prompt.tsx'
|
||||
),
|
||||
'utf8'
|
||||
)
|
||||
const closeStart = source.indexOf('const confirmNativeWindowClose = useCallback(() => {')
|
||||
const closeStart = source.indexOf(' const confirmNativeWindowClose = useCallback(() => {')
|
||||
const closeEnd = source.indexOf('window.api.ui.confirmWindowClose()', closeStart)
|
||||
expect(closeStart).toBeGreaterThanOrEqual(0)
|
||||
expect(closeEnd).toBeGreaterThan(closeStart)
|
||||
|
||||
Reference in New Issue
Block a user