2020-12-22 20:45:11 +00:00
|
|
|
/*
|
2021-01-06 20:37:59 +00:00
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2020-12-22 20:45:11 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
describe('Editor mode from URL parameter is used', () => {
|
|
|
|
it('mode view', () => {
|
|
|
|
cy.visit('/n/features?view')
|
2021-01-11 22:22:11 +00:00
|
|
|
cy.get('.splitter.left')
|
|
|
|
.should('have.class', 'd-none')
|
|
|
|
cy.get('.splitter.right')
|
|
|
|
.should('not.have.class', 'd-none')
|
2020-12-22 20:45:11 +00:00
|
|
|
})
|
|
|
|
it('mode both', () => {
|
|
|
|
cy.visit('/n/features?both')
|
2021-01-11 22:22:11 +00: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 20:45:11 +00:00
|
|
|
})
|
|
|
|
it('mode edit', () => {
|
|
|
|
cy.visit('/n/features?edit')
|
2021-01-11 22:22:11 +00:00
|
|
|
cy.get('.splitter.left')
|
|
|
|
.should('not.have.class', 'd-none')
|
|
|
|
cy.get('.splitter.right')
|
|
|
|
.should('have.class', 'd-none')
|
2020-12-22 20:45:11 +00:00
|
|
|
})
|
|
|
|
})
|