fix(link): fix tests

This commit is contained in:
Dominik Biedebach 2024-01-08 15:06:45 +01:00
parent 6c7b27f39b
commit d495d92a1f
2 changed files with 7 additions and 2 deletions

View File

@ -75,7 +75,8 @@ context('/src/Marks/Link/React/', () => {
it('detects a pasted URL', () => {
cy.get('.tiptap')
.paste({ pastePayload: 'https://example.com', pasteType: 'text/plain' })
.type('{backspace}')
.paste({ pastePayload: 'https://example2.com', pasteType: 'text/plain' })
.find('a')
.should('contain', 'Example Text')
.should('have.attr', 'href', 'https://example.com')
@ -83,6 +84,7 @@ context('/src/Marks/Link/React/', () => {
it('detects a pasted URL with query params', () => {
cy.get('.tiptap')
.type('{backspace}')
.paste({ pastePayload: 'https://example.com?paramA=nice&paramB=cool', pasteType: 'text/plain' })
.find('a')
.should('contain', 'Example Text')

View File

@ -55,7 +55,9 @@ context('/src/Marks/Link/Vue/', () => {
})
it('detects a pasted URL', () => {
cy.get('.tiptap').paste({ pastePayload: 'https://example.com', pasteType: 'text/plain' })
cy.get('.tiptap')
.type('{backspace}')
.paste({ pastePayload: 'https://example2.com', pasteType: 'text/plain' })
.find('a')
.should('contain', 'Example Text')
.should('have.attr', 'href', 'https://example.com')
@ -73,6 +75,7 @@ context('/src/Marks/Link/Vue/', () => {
it('detects a pasted URL with query params', () => {
cy.get('.tiptap')
.type('{backspace}')
.paste({ pastePayload: 'https://example.com?paramA=nice&paramB=cool', pasteType: 'text/plain' })
.find('a')
.should('contain', 'Example Text')