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
|
|
|
|
*/
|
|
|
|
|
|
|
|
describe('Editor mode from URL parameter is used', () => {
|
|
|
|
it('mode view', () => {
|
2021-02-01 16:55:49 -05:00
|
|
|
cy.visitTestEditor('view')
|
2021-01-11 17:22:11 -05:00
|
|
|
cy.get('.splitter.left')
|
|
|
|
.should('have.class', 'd-none')
|
|
|
|
cy.get('.splitter.right')
|
|
|
|
.should('not.have.class', 'd-none')
|
2020-12-22 15:45:11 -05:00
|
|
|
})
|
|
|
|
it('mode both', () => {
|
2021-02-01 16:55:49 -05:00
|
|
|
cy.visitTestEditor('both')
|
2021-01-11 17:22:11 -05:00
|
|
|
cy.get('.splitter.left')
|
|
|
|
.should('not.have.class', 'd-none')
|
|
|
|
cy.get('.splitter.separator')
|
|
|
|
.should('exist')
|
|
|
|
cy.get('.splitter.right')
|
|
|
|
.should('not.have.class', 'd-none')
|
2020-12-22 15:45:11 -05:00
|
|
|
})
|
|
|
|
it('mode edit', () => {
|
2021-02-01 16:55:49 -05:00
|
|
|
cy.visitTestEditor('edit')
|
2021-01-11 17:22:11 -05:00
|
|
|
cy.get('.splitter.left')
|
|
|
|
.should('not.have.class', 'd-none')
|
|
|
|
cy.get('.splitter.right')
|
|
|
|
.should('have.class', 'd-none')
|
2020-12-22 15:45:11 -05:00
|
|
|
})
|
|
|
|
})
|