mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
fix(link): fix tests
This commit is contained in:
parent
6c7b27f39b
commit
d495d92a1f
@ -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¶mB=cool', pasteType: 'text/plain' })
|
||||
.find('a')
|
||||
.should('contain', 'Example Text')
|
||||
|
@ -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¶mB=cool', pasteType: 'text/plain' })
|
||||
.find('a')
|
||||
.should('contain', 'Example Text')
|
||||
|
Loading…
Reference in New Issue
Block a user