some improvements
Some checks failed
CI / check (push) Has been cancelled

This commit is contained in:
2026-09-11 11:01:57 +02:00
parent 1ebb9a0e74
commit f6a551d7c4
8 changed files with 108 additions and 63 deletions

View File

@@ -103,7 +103,7 @@ describe('a file that is staged and then edited again', () => {
expect(splitText(c, 'right')).toEqual(['a', 'STAGED', 'c', 'AFTER-STAGING'])
})
it('the hover panel behind Actual always reaches back to HEAD', async () => {
it('the picked panel behind Actual always reaches back to HEAD', async () => {
const c = await boot()
fireEvent.click(group(c, 'Changes')[0])
const scroll = await waitFor(() => {
@@ -112,7 +112,7 @@ describe('a file that is staged and then edited again', () => {
return el
})
// Line 2 is 'STAGED'. Unwrapped, its band runs from 10 + (2-1)*20.
fireEvent.mouseMove(scroll, { clientY: 10 + 20 + 5 })
fireEvent.click(scroll, { clientY: 10 + 20 + 5 })
const peek = await waitFor(() => {
const p = c.querySelector<HTMLElement>('.peek')
if (!p) throw new Error('peek not ready')
@@ -121,7 +121,8 @@ describe('a file that is staged and then edited again', () => {
const removed = Array.from(peek.querySelectorAll('.ln-row.del'))
expect(removed.map((el) => el.textContent?.replace(/^\d+/, ''))).toEqual(['b'])
fireEvent.mouseLeave(scroll)
// A click anywhere off the code drops it.
fireEvent.mouseDown(document.body)
await waitFor(() => expect(c.querySelector('.peek')).toBeNull())
})