mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Merge pull request #19234 from overleaf/jpa-ae-fix-typing
[server-ce] work around "clicking" by cy.type() in editor tests GitOrigin-RevId: ffb3d7d77a98a3f6359414b5e93f9682c56ef2cd
This commit is contained in:
parent
6c2a5a43d7
commit
33b208d4d5
1 changed files with 8 additions and 2 deletions
|
@ -149,8 +149,14 @@ describe('editor', () => {
|
|||
|
||||
cy.log('enable visual editor and make changes in main file')
|
||||
cy.findByText('Visual Editor').click()
|
||||
cy.contains('Introduction').dblclick()
|
||||
cy.contains('Introduction').type('{del}{enter}{enter}')
|
||||
|
||||
// cy.type() "clicks" in the center of the selected element before typing. This "click" discards the text as selected by the dblclick.
|
||||
// Go down to the lower level event based typing, the frontend tests in web use similar events.
|
||||
cy.get('.cm-editor').as('editor')
|
||||
cy.get('@editor').contains('Introduction').dblclick()
|
||||
cy.get('@editor').trigger('keydown', { key: 'Delete' })
|
||||
cy.get('@editor').trigger('keydown', { key: 'Enter' })
|
||||
cy.get('@editor').trigger('keydown', { key: 'Enter' })
|
||||
|
||||
cy.log('recompile to force flush')
|
||||
cy.findByText('Recompile').click()
|
||||
|
|
Loading…
Reference in a new issue