From db1b957974edb3a32280409bd1a4dfe84071e589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 5 May 2021 20:34:41 +0200 Subject: [PATCH] test: fix link tests --- docs/src/demos/Marks/Link/index.spec.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/src/demos/Marks/Link/index.spec.js b/docs/src/demos/Marks/Link/index.spec.js index 7255d5e4..403cb8c0 100644 --- a/docs/src/demos/Marks/Link/index.spec.js +++ b/docs/src/demos/Marks/Link/index.spec.js @@ -47,10 +47,17 @@ context('/demos/Marks/Link', () => { }) }) + it('detects a pasted URL within a text', () => { + cy.get('.ProseMirror').paste({ pastePayload: 'some text https://example.com around an url', pasteType: 'text/plain' }) + .find('a') + .should('contain', 'https://example.com') + .should('have.attr', 'href', 'https://example.com') + }) + it('detects a pasted URL', () => { cy.get('.ProseMirror').paste({ pastePayload: 'https://example.com', pasteType: 'text/plain' }) .find('a') - .should('contain', 'https://example.com') + .should('contain', 'Example Text') .should('have.attr', 'href', 'https://example.com') })