diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js index ca57890d033..f60d94c21f8 100644 --- a/cypress/e2e/workspace.spec.js +++ b/cypress/e2e/workspace.spec.js @@ -104,7 +104,7 @@ describe('Workspace', function() { }) }) - it('creates lists', function() { + it.only('creates lists', function() { cy.visitTestFolder() cy.openWorkspace().type('List me') cy.getContent().type('{selectall}') @@ -112,7 +112,7 @@ describe('Workspace', function() { ['unordered-list', 'ul'], ['ordered-list', 'ol'], ['task-list', 'ul.contains-task-list'], - ].forEach(([button, tag]) => testButton(button, tag, 'List me')) + ].forEach(([button, tag]) => testListButton(button, tag, 'List me')) }) it('takes README.md into account', function() { @@ -301,6 +301,18 @@ const openSidebar = filename => { cy.get('.app-sidebar-header').should('contain', filename) } +function testListButton(button, tag, content) { + cy.getSubmenuEntry('lists', button) + .should('not.have.class', 'is-active') + .click() + cy.getContent() + .find(`${tag}`) + .should('contain', content) + cy.getSubmenuEntry('lists', button) + .should('have.class', 'is-active') + .click() +} + /** * * @param {string} button Name of the button to click. diff --git a/src/components/Menu/ActionListItem.vue b/src/components/Menu/ActionListItem.vue index 9f994f0da04..97fc38c079f 100644 --- a/src/components/Menu/ActionListItem.vue +++ b/src/components/Menu/ActionListItem.vue @@ -5,6 +5,7 @@