fix bullet list

This commit is contained in:
Philipp Kühn
2020-09-22 20:39:24 +02:00
parent 2856900c6a
commit 2c9973af8c
6 changed files with 77 additions and 28 deletions

View File

@@ -10,24 +10,24 @@ context('/api/extensions/bullet-list', () => {
})
})
// it('should make a bullet list from different markdown shortcuts', () => {
// cy.get('.ProseMirror').then(([{ editor }]) => {
// editor.clearContent()
// })
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}+ List Item 2{enter}- List Item 3')
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(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(2)')
.should('contain', 'List Item 2')
// cy.get('.ProseMirror')
// .find('li:nth-child(3)')
// .should('contain', 'List Item 3')
// })
cy.get('.ProseMirror')
.find('li:nth-child(3)')
.should('contain', 'List Item 3')
})
})

View File

@@ -1,8 +1,8 @@
<template>
<div v-if="editor">
<!-- <button @click="editor.chain().focus().bulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
<button @click="editor.chain().focus().bulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
bullet list
</button> -->
</button>
<editor-content :editor="editor" />
</div>