From 2c9973af8cb87a09448c127d6be686c6ff693a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Tue, 22 Sep 2020 20:39:24 +0200 Subject: [PATCH] fix bullet list --- .../demos/Extensions/BulletList/index.spec.js | 32 ++++++------ .../src/demos/Extensions/BulletList/index.vue | 4 +- packages/core/src/commands/index.ts | 1 + packages/core/src/commands/toggleList.ts | 50 +++++++++++++++++++ packages/extension-bullet-list/index.ts | 10 ++-- packages/extension-list-item/index.ts | 8 ++- 6 files changed, 77 insertions(+), 28 deletions(-) create mode 100644 packages/core/src/commands/toggleList.ts diff --git a/docs/src/demos/Extensions/BulletList/index.spec.js b/docs/src/demos/Extensions/BulletList/index.spec.js index aa88e551..c3615e94 100644 --- a/docs/src/demos/Extensions/BulletList/index.spec.js +++ b/docs/src/demos/Extensions/BulletList/index.spec.js @@ -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') + }) }) \ No newline at end of file diff --git a/docs/src/demos/Extensions/BulletList/index.vue b/docs/src/demos/Extensions/BulletList/index.vue index 401ad57b..7808c9c7 100644 --- a/docs/src/demos/Extensions/BulletList/index.vue +++ b/docs/src/demos/Extensions/BulletList/index.vue @@ -1,8 +1,8 @@