resizes the col widths on app resize

This commit is contained in:
2026-06-16 08:11:10 +02:00
parent 299ae17d80
commit bd466e84a8
3 changed files with 28 additions and 24 deletions

View File

@@ -65,25 +65,19 @@ describe('Pass on to Agent', () => {
})
describe('Stage + commit', () => {
it('stages a file, commits with a message, and toasts', async () => {
it('stages a file and commits via Shift+Enter (no commit button)', async () => {
const c = renderApp()
const row = await waitFor(() => {
const r = find(c, '.git-row', 'UserController.php')
if (!r) throw new Error('git not ready')
return r
})
const stageBtn = row.querySelector<HTMLButtonElement>('button[title="Stage changes"]')!
fireEvent.click(stageBtn)
// commit button reflects the staged count once a file is staged
await waitFor(() => expect(find(c, '.commit-btn', 'Commit')?.textContent).toMatch(/Commit\s*\d/))
fireEvent.click(row.querySelector<HTMLButtonElement>('button[title="Stage changes"]')!)
// the commit button is intentionally gone — committing is keyboard-only
expect(c.querySelector('.commit-btn')).toBeNull()
const msg = c.querySelector<HTMLTextAreaElement>('.commit-input')!
fireEvent.change(msg, { target: { value: 'wire up balance' } })
const commitBtn = find(c, '.commit-btn', 'Commit') as HTMLButtonElement
expect(commitBtn.disabled).toBe(false)
fireEvent.click(commitBtn)
fireEvent.keyDown(msg, { key: 'Enter', shiftKey: true })
await waitFor(() => expect(find(c, '.toast', 'Committed')).toBeTruthy())
})
})