outline-root.spec.tsx 583 B

12345678910111213141516171819202122
  1. import OutlineRoot from '../../../../../frontend/js/features/outline/components/outline-root'
  2. describe('<OutlineRoot />', function () {
  3. it('renders outline', function () {
  4. cy.mount(
  5. <OutlineRoot
  6. outline={[{ title: 'Section', line: 1, level: 10 }]}
  7. jumpToLine={cy.stub()}
  8. />
  9. )
  10. cy.findByRole('tree')
  11. cy.findByRole('link').should('not.exist')
  12. })
  13. it('renders placeholder', function () {
  14. cy.mount(<OutlineRoot outline={[]} jumpToLine={cy.stub()} />)
  15. cy.findByRole('tree').should('not.exist')
  16. cy.findByRole('link')
  17. })
  18. })