This commit is contained in:
@@ -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())
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user