diff --git a/docs/src/demos/Extensions/Bold/index.spec.js b/docs/src/demos/Extensions/Bold/index.spec.js index da2d4f48..7e22cda1 100644 --- a/docs/src/demos/Extensions/Bold/index.spec.js +++ b/docs/src/demos/Extensions/Bold/index.spec.js @@ -10,6 +10,36 @@ context('/api/extensions/bold', () => { }) }) + it('b tags should be transformed to strong tags', () => { + cy.get('.ProseMirror').then(([{ editor }]) => { + editor.setContent('

Example Text

') + expect(editor.html()).to.eq('

Example Text

') + }) + }) + + it('b tags with normal font weight inline style should be omitted', () => { + cy.get('.ProseMirror').then(([{ editor }]) => { + editor.setContent('

Example Text

') + expect(editor.html()).to.eq('

Example Text

') + }) + }) + + it('generic tags with bold inline style should be transformed to strong tags', () => { + cy.get('.ProseMirror').then(([{ editor }]) => { + editor.setContent('

Example Text

') + expect(editor.html()).to.eq('

Example Text

') + + editor.setContent('

Example Text

') + expect(editor.html()).to.eq('

Example Text

') + + editor.setContent('

Example Text

') + expect(editor.html()).to.eq('

Example Text

') + + editor.setContent('

Example Text

') + expect(editor.html()).to.eq('

Example Text

') + }) + }) + it('the button should make the selected text bold', () => { cy.get('.demo__preview button:first') .click()