mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
Add cypress id attribute only in test mode (#1566)
* Add function for test attribute Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Adjust components Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Fix naming of attribute Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Rename method Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Rename method, interface, attribute and use interface Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Lint and format fix Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
2abe40ef1d
commit
a398660c18
48 changed files with 229 additions and 167 deletions
|
@ -10,19 +10,19 @@ describe('Split view', () => {
|
|||
})
|
||||
|
||||
it('can show both panes', () => {
|
||||
cy.get('[data-cy="view-mode-both"]').click()
|
||||
cy.get('[data-cypress-id="view-mode-both"]').click()
|
||||
cy.get('.splitter.left').should('be.visible')
|
||||
cy.get('.splitter.right').should('be.visible')
|
||||
})
|
||||
|
||||
it('can show only preview pane', () => {
|
||||
cy.get('[data-cy="view-mode-preview"]').click()
|
||||
cy.get('[data-cypress-id="view-mode-preview"]').click()
|
||||
cy.get('.splitter.left').should('be.not.visible')
|
||||
cy.get('.splitter.right').should('be.visible')
|
||||
})
|
||||
|
||||
it('can show only editor pane', () => {
|
||||
cy.get('[data-cy="view-mode-editor"]').click()
|
||||
cy.get('[data-cypress-id="view-mode-editor"]').click()
|
||||
cy.get('.splitter.left').should('be.visible')
|
||||
cy.get('.splitter.right').should('be.not.visible')
|
||||
})
|
||||
|
@ -31,7 +31,7 @@ describe('Split view', () => {
|
|||
cy.get('.splitter.left').then((leftPanebefore) => {
|
||||
const widthBefore = leftPanebefore.outerWidth()
|
||||
|
||||
cy.get('[data-cy="view-mode-both"]').click()
|
||||
cy.get('[data-cypress-id="view-mode-both"]').click()
|
||||
cy.get('.split-divider').should('be.visible').trigger('mousedown', { buttons: 1 })
|
||||
cy.document().trigger('mousemove', { buttons: 1, pageX: 0, pageY: 0 })
|
||||
cy.get('.split-divider').trigger('mouseup')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue