Merge pull request #10348 from overleaf/mj-outline-fixes-redo

[cm6] File outline improvements

GitOrigin-RevId: 9f4859cb35476d4baf0b3e3c2c2cb5d1678fd4a8
This commit is contained in:
Mathias Jakobsen
2022-11-09 09:04:08 +00:00
committed by Copybot
parent f803563673
commit 8ddfd958d2
6 changed files with 56 additions and 0 deletions
@@ -115,4 +115,35 @@ describe('<OutlinePane />', function () {
expect(global.localStorage.setItem).to.be.calledWithMatch(/123abc/, 'true')
expect(onToggle).to.be.calledTwice
})
it('shows warning on partial result', function () {
render(
<OutlinePane
isTexFile
outline={[]}
jumpToLine={jumpToLine}
onToggle={onToggle}
eventTracking={eventTracking}
show
isPartial
/>
)
expect(screen.queryByRole('status')).to.exist
})
it('shows no warning on non-partial result', function () {
render(
<OutlinePane
isTexFile
outline={[]}
jumpToLine={jumpToLine}
onToggle={onToggle}
eventTracking={eventTracking}
show
isPartial={false}
/>
)
expect(screen.queryByRole('status')).to.not.exist
})
})