Files
tiptap/docs/src/demos/Extensions/BulletList/index.spec.js
Philipp Kühn 2c9973af8c fix bullet list
2020-09-22 20:39:24 +02:00

33 lines
850 B
JavaScript

context('/api/extensions/bullet-list', () => {
before(() => {
cy.visit('/api/extensions/bullet-list')
})
beforeEach(() => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p>Example Text</p>')
editor.selectAll()
})
})
it('should make a bullet list from different markdown shortcuts', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.clearContent()
})
cy.get('.ProseMirror')
.type('* List Item 1{enter}{enter}+ List Item 2{enter}{enter}- List Item 3')
cy.get('.ProseMirror')
.find('li:nth-child(1)')
.should('contain', 'List Item 1')
cy.get('.ProseMirror')
.find('li:nth-child(2)')
.should('contain', 'List Item 2')
cy.get('.ProseMirror')
.find('li:nth-child(3)')
.should('contain', 'List Item 3')
})
})