test: fix images test in react and collaboration annotation test

This commit is contained in:
Dominik Biedebach 2022-05-13 16:27:55 +02:00 committed by Dominik
parent 19cc6e1f28
commit 8e3c2a3b66
4 changed files with 5 additions and 6 deletions

View File

@ -17,10 +17,7 @@ context('/src/Examples/Images/React/', () => {
it('allows images to be added via URL', () => {
cy.window().then(win => {
cy.stub(win, 'prompt').returns('https://unsplash.it/250/250')
cy.wait(1000)
cy.get('button').contains('add image from URL').click()
cy.wait(1000)
cy.get('button').contains('add image from URL').click({ force: false })
cy.get('.ProseMirror img').should('have.length', 3)
})
})

View File

@ -20,7 +20,7 @@ context('/src/Examples/Images/Vue/', () => {
cy.stub(win, 'prompt').returns('https://unsplash.it/250/250')
cy.wait(1000)
cy.get('button').contains('add image from URL').click()
cy.get('button').contains('add image from URL').click({ force: false })
cy.wait(1000)
cy.get('.ProseMirror img').should('have.length', 3)
})

View File

@ -40,6 +40,7 @@ context('/src/Experiments/CollaborationAnnotation/Vue/', () => {
cy.get('.editor-1 .ProseMirror').type('{selectall}{backspace}Hello world{selectall}')
cy.get('button').contains('comment').eq(0).click()
cy.wait(1000)
cy.get('.editor-1 .ProseMirror').find('.annotation').click()
cy.get('.comment').should('exist').contains('This is a test comment')
cy.get('button').contains('update').click()
cy.wait(1000)
@ -54,6 +55,7 @@ context('/src/Experiments/CollaborationAnnotation/Vue/', () => {
cy.get('.editor-1 .ProseMirror').type('{selectall}{backspace}Hello world{selectall}')
cy.get('button').contains('comment').eq(0).click()
cy.wait(1000)
cy.get('.editor-1 .ProseMirror').find('.annotation').click()
cy.get('.comment').should('exist').contains('This is a test comment')
cy.get('button').contains('remove').click()
cy.get('.ProseMirror .annotation').should('not.exist')

View File

@ -2,5 +2,5 @@
"baseUrl": "http://localhost:3000",
"integrationFolder": "../",
"testFiles": "{demos,tests}/**/*.spec.{js,ts}",
"defaultCommandTimeout": 5000
"defaultCommandTimeout": 15000
}