mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
3ad686c30b
New project layout dropdown GitOrigin-RevId: 8d7f4ff6649fe249b762642e70522597e5e78dd4
23 lines
774 B
JavaScript
23 lines
774 B
JavaScript
import { render, screen } from '@testing-library/react'
|
|
import LayoutDropdownButton from '../../../../../frontend/js/features/editor-navigation-toolbar/components/layout-dropdown-button'
|
|
|
|
describe('<LayoutDropdownButton />', function () {
|
|
const defaultProps = {
|
|
handleChangeLayout: () => {},
|
|
pdfLayout: 'flat',
|
|
view: 'editor',
|
|
}
|
|
|
|
it('should mark current layout option as selected (visually by checkmark, and aria-label for accessibility)', function () {
|
|
render(<LayoutDropdownButton {...defaultProps} />)
|
|
screen.getByRole('menuitem', {
|
|
name: 'Editor & PDF',
|
|
})
|
|
screen.getByRole('menuitem', {
|
|
name: 'PDF only (hide editor)',
|
|
})
|
|
screen.getByRole('menuitem', {
|
|
name: 'Selected Editor only (hide PDF)',
|
|
})
|
|
})
|
|
})
|