mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-12 00:19:02 +08:00
test: fix images test in react and collaboration annotation test
This commit is contained in:
parent
19cc6e1f28
commit
8e3c2a3b66
@ -17,10 +17,7 @@ context('/src/Examples/Images/React/', () => {
|
|||||||
it('allows images to be added via URL', () => {
|
it('allows images to be added via URL', () => {
|
||||||
cy.window().then(win => {
|
cy.window().then(win => {
|
||||||
cy.stub(win, 'prompt').returns('https://unsplash.it/250/250')
|
cy.stub(win, 'prompt').returns('https://unsplash.it/250/250')
|
||||||
|
cy.get('button').contains('add image from URL').click({ force: false })
|
||||||
cy.wait(1000)
|
|
||||||
cy.get('button').contains('add image from URL').click()
|
|
||||||
cy.wait(1000)
|
|
||||||
cy.get('.ProseMirror img').should('have.length', 3)
|
cy.get('.ProseMirror img').should('have.length', 3)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -20,7 +20,7 @@ context('/src/Examples/Images/Vue/', () => {
|
|||||||
cy.stub(win, 'prompt').returns('https://unsplash.it/250/250')
|
cy.stub(win, 'prompt').returns('https://unsplash.it/250/250')
|
||||||
|
|
||||||
cy.wait(1000)
|
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.wait(1000)
|
||||||
cy.get('.ProseMirror img').should('have.length', 3)
|
cy.get('.ProseMirror img').should('have.length', 3)
|
||||||
})
|
})
|
||||||
|
@ -40,6 +40,7 @@ context('/src/Experiments/CollaborationAnnotation/Vue/', () => {
|
|||||||
cy.get('.editor-1 .ProseMirror').type('{selectall}{backspace}Hello world{selectall}')
|
cy.get('.editor-1 .ProseMirror').type('{selectall}{backspace}Hello world{selectall}')
|
||||||
cy.get('button').contains('comment').eq(0).click()
|
cy.get('button').contains('comment').eq(0).click()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
|
cy.get('.editor-1 .ProseMirror').find('.annotation').click()
|
||||||
cy.get('.comment').should('exist').contains('This is a test comment')
|
cy.get('.comment').should('exist').contains('This is a test comment')
|
||||||
cy.get('button').contains('update').click()
|
cy.get('button').contains('update').click()
|
||||||
cy.wait(1000)
|
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('.editor-1 .ProseMirror').type('{selectall}{backspace}Hello world{selectall}')
|
||||||
cy.get('button').contains('comment').eq(0).click()
|
cy.get('button').contains('comment').eq(0).click()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
|
cy.get('.editor-1 .ProseMirror').find('.annotation').click()
|
||||||
cy.get('.comment').should('exist').contains('This is a test comment')
|
cy.get('.comment').should('exist').contains('This is a test comment')
|
||||||
cy.get('button').contains('remove').click()
|
cy.get('button').contains('remove').click()
|
||||||
cy.get('.ProseMirror .annotation').should('not.exist')
|
cy.get('.ProseMirror .annotation').should('not.exist')
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
"baseUrl": "http://localhost:3000",
|
"baseUrl": "http://localhost:3000",
|
||||||
"integrationFolder": "../",
|
"integrationFolder": "../",
|
||||||
"testFiles": "{demos,tests}/**/*.spec.{js,ts}",
|
"testFiles": "{demos,tests}/**/*.spec.{js,ts}",
|
||||||
"defaultCommandTimeout": 5000
|
"defaultCommandTimeout": 15000
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user