test: remove low-value title editing and drag tests (#43091)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-11-16 04:46:03 -08:00
committed by GitHub
co-authored by OrcaWin
parent ab7a9403fd
commit 7b724410fa
5 changed files with 0 additions and 359 deletions
-1
View File
@@ -299,7 +299,6 @@
1 test-no-real-time-wait:tests/e2e/terminal-macos-system-key-remap.spec.ts
3 test-no-real-time-wait:tests/e2e/terminal-opencode-emoji-table-rendering.spec.ts
4 test-no-real-time-wait:tests/e2e/terminal-pane-close-layout-consistency.spec.ts
2 test-no-real-time-wait:tests/e2e/terminal-pane-title-editing.spec.ts
4 test-no-real-time-wait:tests/e2e/terminal-parked-memory.spec.ts
2 test-no-real-time-wait:tests/e2e/terminal-pinned-viewport-streaming-switch.spec.ts
2 test-no-real-time-wait:tests/e2e/terminal-pinned-viewport-worktree-switch.spec.ts
@@ -5037,7 +5037,6 @@
"tests/e2e/terminal-pane-close-layout-consistency.spec.ts": 128900,
"tests/e2e/terminal-pane-content-retention.spec.ts": 45100,
"tests/e2e/terminal-pane-split-identity.spec.ts": 81000,
"tests/e2e/terminal-pane-title-editing.spec.ts": 189100,
"tests/e2e/terminal-pane-title-strip-placement.spec.ts": 62400,
"tests/e2e/terminal-parked-cli-split.spec.ts": 28900,
"tests/e2e/terminal-parked-close-retirement.spec.ts": 16300,
-31
View File
@@ -139,37 +139,6 @@ test('concurrent floating Markdown renames do not clobber the destination', asyn
).toEqual(['first\n', 'second\n'])
})
test('Enter commits a floating Markdown rename only once', async ({ orcaPage }) => {
const seeded = await seedFloatingMarkdownFile(orcaPage)
await openFloatingPanel(orcaPage)
const panel = orcaPage.locator(OPEN_PANEL_SELECTOR)
const tab = panel.locator(`[data-tab-id="${seeded.tabId}"]`)
await tab.click({ button: 'right' })
await orcaPage.getByRole('menuitem').filter({ hasText: 'Rename' }).first().click()
const input = panel.getByRole('textbox', {
name: `Rename file ${seeded.originalName}`,
exact: true
})
await input.fill(seeded.renamedName)
await input.press('Enter')
await expect(tab).toContainText(seeded.renamedName)
await expect
.poll(() =>
orcaPage.evaluate(
async ({ originalPath, renamedPath }) => ({
originalExists: await window.api.fs.pathExists({ filePath: originalPath }),
renamedExists: await window.api.fs.pathExists({ filePath: renamedPath })
}),
{ originalPath: seeded.originalPath, renamedPath: seeded.renamedPath }
)
)
.toEqual({ originalExists: false, renamedExists: true })
await expect(orcaPage.getByText(/Failed to rename/)).toHaveCount(0)
})
test('Electron serializes native Unicode rename aliases', async ({ orcaPage }) => {
test.skip(process.platform !== 'darwin', 'Requires native Unicode aliasing')
const directory = await orcaPage.evaluate(() => window.api.app.getFloatingMarkdownDirectory())
@@ -1,236 +0,0 @@
import type { Page } from '@stablyai/playwright-test'
import { test, expect } from './helpers/orca-app'
import { splitActiveTerminalPane, waitForPaneCount } from './helpers/terminal'
import { getActiveWorktreeId, getActiveTabId, getWorktreeTabs } from './helpers/store'
import { pressShortcut } from './helpers/shortcuts'
import {
setPaneTitleFromTerminalMenu,
openTerminalContextMenu
} from './helpers/terminal-pane-title-actions'
import './helpers/terminal-pane-geometry'
import { registerTerminalPaneMountReadiness } from './helpers/terminal-pane-mount-readiness'
async function openPaneTitleContextMenu(page: Page, title: string): Promise<void> {
const modifiers: ('Alt' | 'Control' | 'Meta' | 'Shift')[] = (await page.evaluate(() =>
navigator.userAgent.includes('Windows')
))
? ['Control']
: []
const isMac = await page.evaluate(() => navigator.userAgent.includes('Mac'))
const titleBar = page.locator('.pane-title-bar', { hasText: title }).first()
await expect(titleBar).toBeVisible()
await titleBar.click({
button: isMac ? 'left' : 'right',
position: { x: 20, y: 10 },
modifiers: isMac ? ['Control'] : modifiers
})
await expect(page.getByText('Set Title…', { exact: true })).toBeVisible()
}
async function getTabCustomTitle(
page: Page,
worktreeId: string,
tabId: string
): Promise<string | null> {
return page.evaluate(
({ targetWorktreeId, targetTabId }) => {
const state = window.__store!.getState()
const tab = (state.tabsByWorktree[targetWorktreeId] ?? []).find(
(entry) => entry.id === targetTabId
)
return tab?.customTitle ?? null
},
{ targetWorktreeId: worktreeId, targetTabId: tabId }
)
}
async function expectTabCustomTitle(
page: Page,
worktreeId: string,
tabId: string,
expected: string | null
): Promise<void> {
await expect
.poll(() => getTabCustomTitle(page, worktreeId, tabId), { timeout: 3_000 })
.toBe(expected)
}
async function expectSavedLayoutNotToContainTitle(
page: Page,
tabId: string,
title: string
): Promise<void> {
await expect
.poll(
() =>
page.evaluate(
({ targetTabId, title }) => {
const layout = window.__store!.getState().terminalLayoutsByTabId[targetTabId]
return Object.values(layout?.titlesByLeafId ?? {}).includes(title)
},
{ targetTabId: tabId, title }
),
{ timeout: 3_000 }
)
.toBe(false)
}
// Serialize headful scenarios; visible-window runs require an isolated display.
test.describe.configure({ mode: 'serial' })
test.describe('Terminal Panes', () => {
registerTerminalPaneMountReadiness()
test('first Set Title from terminal context menu stays open for typing', async ({ orcaPage }) => {
const title = `First menu title ${Date.now()}`
await openTerminalContextMenu(orcaPage)
await orcaPage.getByText('Set Title…', { exact: true }).click()
const titleInput = orcaPage.locator('.pane-title-input').first()
await expect(titleInput).toBeVisible()
await expect(titleInput).toBeFocused()
await orcaPage.waitForTimeout(250)
await expect(titleInput).toBeVisible()
await expect(titleInput).toBeFocused()
await titleInput.fill(title)
await titleInput.press('Enter')
await expect(titleInput).toHaveCount(0)
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toHaveCount(1)
})
test('Set Title context menu opens from the title overlay strip', async ({ orcaPage }) => {
const title = `Overlay menu title ${Date.now()}`
const updatedTitle = `Overlay menu updated ${Date.now()}`
await setPaneTitleFromTerminalMenu(orcaPage, title)
await openPaneTitleContextMenu(orcaPage, title)
await orcaPage.getByText('Set Title…', { exact: true }).click()
const titleInput = orcaPage.locator('.pane-title-input').first()
await expect(titleInput).toBeVisible()
await expect(titleInput).toBeFocused()
await expect(titleInput).toHaveValue(title)
await titleInput.fill(updatedTitle)
await titleInput.press('Enter')
await expect(orcaPage.locator('.pane-title-text', { hasText: updatedTitle })).toHaveCount(1)
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toHaveCount(0)
})
test('Set Title commits when tabbing away from the title input', async ({ orcaPage }) => {
const title = `Tab commit title ${Date.now()}`
await openTerminalContextMenu(orcaPage)
await orcaPage.getByText('Set Title…', { exact: true }).click()
const titleInput = orcaPage.locator('.pane-title-input').first()
await expect(titleInput).toBeVisible()
await expect(titleInput).toBeFocused()
await titleInput.fill(title)
await titleInput.press('Tab')
await expect(titleInput).toHaveCount(0)
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toHaveCount(1)
})
test('Set Title overlay hides with its inactive terminal tab', async ({ orcaPage }) => {
const title = `Hidden tab title ${Date.now()}`
const worktreeId = (await getActiveWorktreeId(orcaPage))!
await setPaneTitleFromTerminalMenu(orcaPage, title)
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toBeVisible()
await pressShortcut(orcaPage, 't')
await expect
.poll(async () => (await getWorktreeTabs(orcaPage, worktreeId)).length, { timeout: 5_000 })
.toBeGreaterThanOrEqual(2)
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toBeHidden()
await pressShortcut(orcaPage, 'BracketLeft', { shift: true })
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toBeVisible()
})
test('Set Title still commits by blur after focus settles', async ({ orcaPage }) => {
const title = `Blur commit title ${Date.now()}`
await openTerminalContextMenu(orcaPage)
await orcaPage.getByText('Set Title…', { exact: true }).click()
const titleInput = orcaPage.locator('.pane-title-input').first()
await expect(titleInput).toBeVisible()
await expect(titleInput).toBeFocused()
await orcaPage.waitForTimeout(100)
await titleInput.fill(title)
await orcaPage
.locator('.xterm:visible')
.first()
.click({ position: { x: 40, y: 60 } })
await expect(titleInput).toHaveCount(0)
await expect(orcaPage.locator('.pane-title-text', { hasText: title })).toHaveCount(1)
})
test('Set Title stays pane-local during agent title churn', async ({ orcaPage }) => {
const worktreeId = (await getActiveWorktreeId(orcaPage))!
const tabId = (await getActiveTabId(orcaPage))!
const paneTitle = `Codex pane ${Date.now()}`
const removeButtonTitle = `Remove button label ${Date.now()}`
const splitTitle = `Split label ${Date.now()}`
const runtimeTitle = '⠋ Codex working'
await setPaneTitleFromTerminalMenu(orcaPage, paneTitle)
await expect(orcaPage.locator('.pane-title-text', { hasText: paneTitle })).toBeVisible()
await expectTabCustomTitle(orcaPage, worktreeId, tabId, null)
await orcaPage.getByRole('button', { name: `Edit pane title: ${paneTitle}` }).focus()
await orcaPage.keyboard.press('Enter')
const paneTitleInput = orcaPage.getByRole('textbox', { name: 'Pane title' })
await expect(paneTitleInput).toBeVisible()
await expect(paneTitleInput).toBeFocused()
await orcaPage.keyboard.press('Escape')
await expect(paneTitleInput).toHaveCount(0)
await expect(orcaPage.locator('.pane-title-text', { hasText: paneTitle })).toBeVisible()
await orcaPage.evaluate(
({ targetTabId, title }) => {
window.__store!.getState().updateTabTitle(targetTabId, title)
},
{ targetTabId: tabId, title: runtimeTitle }
)
// OSC titles may churn continuously; pane-local Set Title must remain visible while tab runtime title follows the active PTY.
await expect(orcaPage.locator('.pane-title-text', { hasText: paneTitle })).toBeVisible()
await expect(
orcaPage.locator(`[data-testid="sortable-tab"][data-tab-id="${tabId}"]`)
).toHaveAttribute('data-tab-title', runtimeTitle)
await expectTabCustomTitle(orcaPage, worktreeId, tabId, null)
await setPaneTitleFromTerminalMenu(orcaPage, '')
await expect(orcaPage.locator('.pane-title-text', { hasText: paneTitle })).toBeHidden()
await expectSavedLayoutNotToContainTitle(orcaPage, tabId, paneTitle)
await setPaneTitleFromTerminalMenu(orcaPage, removeButtonTitle)
await setPaneTitleFromTerminalMenu(orcaPage, '')
await expect(orcaPage.locator('.pane-title-text', { hasText: removeButtonTitle })).toBeHidden()
await expectSavedLayoutNotToContainTitle(orcaPage, tabId, removeButtonTitle)
await setPaneTitleFromTerminalMenu(orcaPage, splitTitle)
await expectTabCustomTitle(orcaPage, worktreeId, tabId, null)
await splitActiveTerminalPane(orcaPage, 'vertical')
await waitForPaneCount(orcaPage, 2)
await expect(orcaPage.locator('.pane-title-text', { hasText: splitTitle })).toBeVisible()
await orcaPage.evaluate(
({ targetTabId, title }) => {
window.__store!.getState().updateTabTitle(targetTabId, title)
},
{ targetTabId: tabId, title: runtimeTitle }
)
await expect(
orcaPage.locator(`[data-testid="sortable-tab"][data-tab-id="${tabId}"]`)
).toHaveAttribute('data-tab-title', runtimeTitle)
})
})
@@ -1,8 +1,6 @@
import type { Page } from '@stablyai/playwright-test'
import { test, expect } from './helpers/orca-app'
import {
readPaneIdentitySnapshot,
readTerminalPaneDomLeafOrder,
splitActiveTerminalPane,
waitForPaneIdentitySnapshot,
waitForPaneCount
@@ -10,42 +8,6 @@ import {
import { setPaneTitleFromTerminalMenu } from './helpers/terminal-pane-title-actions'
import { registerTerminalPaneMountReadiness } from './helpers/terminal-pane-mount-readiness'
async function expectPaneTitleAttachedToLeaf(
page: Page,
title: string,
leafId: string
): Promise<void> {
await expect
.poll(
() =>
page.evaluate(
({ title, leafId }) => {
const titleBar = Array.from(
document.querySelectorAll<HTMLElement>('.pane-title-bar')
).find((element) => element.textContent?.includes(title))
const pane = document.querySelector<HTMLElement>(`.pane[data-leaf-id="${leafId}"]`)
if (!titleBar || !pane) {
return false
}
const titleRect = titleBar.getBoundingClientRect()
const paneRect = pane.getBoundingClientRect()
return (
Math.abs(titleRect.left - paneRect.left) < 1 &&
Math.abs(titleRect.top - paneRect.top) < 1 &&
Math.abs(titleRect.width - paneRect.width) < 1
)
},
{ title, leafId }
),
{
timeout: 5_000,
message: 'Pane title overlay did not stay attached to its pane'
}
)
.toBe(true)
}
// Serialize headful scenarios; visible-window runs require an isolated display.
test.describe.configure({ mode: 'serial' })
test.describe('Terminal Panes', () => {
registerTerminalPaneMountReadiness()
@@ -131,56 +93,4 @@ test.describe('Terminal Panes', () => {
)
.toEqual({ activeLeafId: otherPane.leafId, targetHasPath: true, otherHasPath: false })
})
test('@headful Set Title pane can be dragged from the title strip', async ({ orcaPage }) => {
const title = `Dragged title ${Date.now()}`
await setPaneTitleFromTerminalMenu(orcaPage, title)
const initialSnapshot = await waitForPaneIdentitySnapshot(orcaPage, 1)
const titledLeafId = initialSnapshot.activeLeafId ?? initialSnapshot.panes[0]?.leafId
if (!titledLeafId) {
throw new Error('No titled pane leaf id found before drag')
}
await splitActiveTerminalPane(orcaPage, 'vertical')
await waitForPaneCount(orcaPage, 2)
const beforeDrag = await waitForPaneIdentitySnapshot(orcaPage, 2)
const target = beforeDrag.panes.find((pane) => pane.leafId !== titledLeafId)
if (!target) {
throw new Error('No target pane found for titled pane drag')
}
const beforeOrder = await readTerminalPaneDomLeafOrder(orcaPage)
const titleDragHandle = orcaPage
.locator('.pane-title-bar', { hasText: title })
.locator('.pane-title-drag-handle')
await expect(titleDragHandle).toBeVisible({ timeout: 3_000 })
const sourceBox = await titleDragHandle.boundingBox()
const targetBox = await orcaPage.locator(`.pane[data-leaf-id="${target.leafId}"]`).boundingBox()
expect(sourceBox).not.toBeNull()
expect(targetBox).not.toBeNull()
const sourceIndex = beforeOrder.indexOf(titledLeafId)
const targetIndex = beforeOrder.indexOf(target.leafId)
const targetDropX =
sourceIndex < targetIndex ? targetBox!.x + targetBox!.width - 8 : targetBox!.x + 8
await orcaPage.mouse.move(sourceBox!.x + sourceBox!.width / 2, sourceBox!.y + 4)
await orcaPage.mouse.down()
await orcaPage.mouse.move(targetDropX, targetBox!.y + targetBox!.height / 2, {
steps: 20
})
await orcaPage.mouse.up()
await expect
.poll(async () => readTerminalPaneDomLeafOrder(orcaPage), {
timeout: 10_000,
message: 'Title-strip pane drag did not update DOM order'
})
.not.toEqual(beforeOrder)
const afterDrag = await waitForPaneIdentitySnapshot(orcaPage, 2)
expect(afterDrag.panes.map((pane) => pane.leafId).sort()).toEqual(
beforeDrag.panes.map((pane) => pane.leafId).sort()
)
await expectPaneTitleAttachedToLeaf(orcaPage, title, titledLeafId)
})
})