Add new visit functions in e2e tests

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-01-30 21:46:43 +01:00
parent 566b3009b6
commit ca5dae3f82
34 changed files with 88 additions and 56 deletions

View file

@ -4,20 +4,22 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { PAGE_MODE } from '../support/visit'
describe('Editor mode from URL parameter is used', () => {
it('mode view', () => {
cy.visitTestEditor('view')
cy.visitTestNote(PAGE_MODE.EDITOR, 'view')
cy.getByCypressId('splitter-left').should('not.be.visible')
cy.getByCypressId('splitter-right').should('be.visible')
})
it('mode both', () => {
cy.visitTestEditor('both')
cy.visitTestNote(PAGE_MODE.EDITOR, 'both')
cy.getByCypressId('splitter-left').should('be.visible')
cy.getByCypressId('splitter-separator').should('exist')
cy.getByCypressId('splitter-right').should('be.visible')
})
it('mode edit', () => {
cy.visitTestEditor('edit')
cy.visitTestNote(PAGE_MODE.EDITOR, 'edit')
cy.getByCypressId('splitter-left').should('be.visible')
cy.getByCypressId('splitter-right').should('not.be.visible')
})