Skip to content

Commit

Permalink
fix(link): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbch committed Jan 8, 2024
1 parent 6c7b27f commit d495d92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion demos/src/Marks/Link/React/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ 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')
})

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')
Expand Down
5 changes: 4 additions & 1 deletion demos/src/Marks/Link/Vue/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down

0 comments on commit d495d92

Please sign in to comment.