editor-expand-button.test.js 738 B

12345678910111213141516171819
  1. import { screen } from '@testing-library/react'
  2. import { renderWithEditorContext } from '../../../helpers/render-with-context'
  3. import EditorExpandButton from '../../../../../frontend/js/features/source-editor/components/editor-expand-button'
  4. describe('<EditorExpandButton />', function () {
  5. it('show split screen button', function () {
  6. renderWithEditorContext(<EditorExpandButton />, {
  7. ui: { view: 'editor', pdfLayout: 'flat' },
  8. })
  9. screen.getByRole('button', { name: 'Split screen' })
  10. })
  11. it('show full screen button', function () {
  12. renderWithEditorContext(<EditorExpandButton />, {
  13. ui: { view: 'editor', pdfLayout: 'sideBySide' },
  14. })
  15. screen.getByRole('button', { name: 'Full screen' })
  16. })
  17. })