2020-12-22 15:45:11 -05:00
|
|
|
/*
|
2021-01-06 15:37:59 -05:00
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2020-12-22 15:45:11 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-01-30 15:46:43 -05:00
|
|
|
import { PAGE_MODE } from '../support/visit'
|
|
|
|
|
2020-12-22 15:45:11 -05:00
|
|
|
describe('Editor mode from URL parameter is used', () => {
|
|
|
|
it('mode view', () => {
|
2022-01-30 15:46:43 -05:00
|
|
|
cy.visitTestNote(PAGE_MODE.EDITOR, 'view')
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('splitter-left').should('not.be.visible')
|
|
|
|
cy.getByCypressId('splitter-right').should('be.visible')
|
2020-12-22 15:45:11 -05:00
|
|
|
})
|
|
|
|
it('mode both', () => {
|
2022-01-30 15:46:43 -05:00
|
|
|
cy.visitTestNote(PAGE_MODE.EDITOR, 'both')
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('splitter-left').should('be.visible')
|
|
|
|
cy.getByCypressId('splitter-separator').should('exist')
|
|
|
|
cy.getByCypressId('splitter-right').should('be.visible')
|
2020-12-22 15:45:11 -05:00
|
|
|
})
|
|
|
|
it('mode edit', () => {
|
2022-01-30 15:46:43 -05:00
|
|
|
cy.visitTestNote(PAGE_MODE.EDITOR, 'edit')
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getByCypressId('splitter-left').should('be.visible')
|
|
|
|
cy.getByCypressId('splitter-right').should('not.be.visible')
|
2020-12-22 15:45:11 -05:00
|
|
|
})
|
|
|
|
})
|