overleaf/services/web/test/frontend/features/outline/components/outline-root.spec.tsx
Tim Down e60885aa88 Merge pull request #19347 from overleaf/td-bs5-cypress-css
Move CSS loading in Cypress to individual test spec files

GitOrigin-RevId: 92bb5167cfa81b0bd54acc724efb23b397421ccb
2024-07-25 08:05:16 +00:00

23 lines
621 B
TypeScript

import '../../../helpers/bootstrap-3'
import OutlineRoot from '../../../../../frontend/js/features/outline/components/outline-root'
describe('<OutlineRoot />', function () {
it('renders outline', function () {
cy.mount(
<OutlineRoot
outline={[{ title: 'Section', line: 1, level: 10 }]}
jumpToLine={cy.stub()}
/>
)
cy.findByRole('tree')
cy.findByRole('link').should('not.exist')
})
it('renders placeholder', function () {
cy.mount(<OutlineRoot outline={[]} jumpToLine={cy.stub()} />)
cy.findByRole('tree').should('not.exist')
cy.findByRole('link')
})
})