This commit is contained in:
@@ -52,7 +52,7 @@ describe('a change that only removes a line', () => {
|
||||
expect(c.querySelector('.ce-gutter .chg')).toBeNull()
|
||||
})
|
||||
|
||||
it('hands the removed line to the picked panel', async () => {
|
||||
it('opens the full-screen Diff from the ruled line', async () => {
|
||||
const c = await openRow()
|
||||
const scroll = await waitFor(() => {
|
||||
const el = c.querySelector<HTMLElement>('.ce-scroll')
|
||||
@@ -61,11 +61,8 @@ describe('a change that only removes a line', () => {
|
||||
})
|
||||
// 'tail' took the place of the removed line, and sits on line 2.
|
||||
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')
|
||||
return p
|
||||
})
|
||||
expect(Array.from(peek.querySelectorAll('.ln-row.del')).map((el) => el.textContent?.replace(/^\d+/, ''))).toEqual(['gone'])
|
||||
await waitFor(() => expect(c.querySelector('.split-overlay')).toBeTruthy())
|
||||
const left = Array.from(c.querySelectorAll('.split-pane.left .ln-row.del'))
|
||||
expect(left.map((el) => el.textContent?.replace(/^\d+/, ''))).toEqual(['gone'])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user