fix tests
This commit is contained in:
@@ -13,21 +13,21 @@ context('/api/marks/link', () => {
|
|||||||
it('should parse a tags correctly', () => {
|
it('should parse a tags correctly', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p><a href="#">Example Text</a></p>')
|
editor.commands.setContent('<p><a href="#">Example Text</a></p>')
|
||||||
expect(editor.getHTML()).to.eq('<p><a href="#" target="_blank" rel="noopener noreferrer nofollow">Example Text</a></p>')
|
expect(editor.getHTML()).to.eq('<p><a target="_blank" rel="noopener noreferrer nofollow" href="#">Example Text</a></p>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should parse a tags with target attribute correctly', () => {
|
it('should parse a tags with target attribute correctly', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p><a href="#" target="_self">Example Text</a></p>')
|
editor.commands.setContent('<p><a href="#" target="_self">Example Text</a></p>')
|
||||||
expect(editor.getHTML()).to.eq('<p><a href="#" target="_self" rel="noopener noreferrer nofollow">Example Text</a></p>')
|
expect(editor.getHTML()).to.eq('<p><a target="_self" rel="noopener noreferrer nofollow" href="#">Example Text</a></p>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should parse a tags with rel attribute correctly', () => {
|
it('should parse a tags with rel attribute correctly', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p><a href="#" rel="follow">Example Text</a></p>')
|
editor.commands.setContent('<p><a href="#" rel="follow">Example Text</a></p>')
|
||||||
expect(editor.getHTML()).to.eq('<p><a href="#" target="_blank" rel="noopener noreferrer nofollow">Example Text</a></p>')
|
expect(editor.getHTML()).to.eq('<p><a target="_blank" rel="noopener noreferrer nofollow" href="#">Example Text</a></p>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user