diff options
author | Max <max@nextcloud.com> | 2022-03-23 16:27:52 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-03-31 15:29:27 +0300 |
commit | 08a976438a88a117ebf8256ff8c3c18af7128b14 (patch) | |
tree | 066b4f75e6d05182e6b7a013a742809c743e4208 /cypress | |
parent | 9ebbe2e01062b36339020824b93ff67ec4b53652 (diff) |
feature: button to remove table
Hide it in table settings so it is harder to hit by accident.
Undo still works - but still - it is quite a destructive action.
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/integration/workspace.spec.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cypress/integration/workspace.spec.js b/cypress/integration/workspace.spec.js index 85e616693..f7edfd907 100644 --- a/cypress/integration/workspace.spec.js +++ b/cypress/integration/workspace.spec.js @@ -213,6 +213,22 @@ describe('Workspace', function() { menuButton('info').should('not.have.class', 'is-active') }) }) + + it('inserts and removes a table', function() { + openWorkspace() + .type('Let\'s insert a Table') + toggleMoreActions() + popoverButton('table') + .click() + cy.get(`.ProseMirror`).type('content') + cy.get(`.ProseMirror table tr:first-child th:first-child`) + .should('contain', 'content') + cy.get(`.ProseMirror .table-settings`).click() + popoverButton('delete').click() + cy.get(`.ProseMirror`) + .should('not.contain', 'content') + }) + }) const menuButton = (name) => { @@ -223,6 +239,14 @@ const submenuButton = (name) => { return cy.get(`#editor button .icon-${name}`) } +const popoverButton = (name) => { + return cy.get(`.popover button .icon-${name}`) +} + +const toggleMoreActions = () => { + cy.get('.menubar .action-item__menutoggle--default-icon').click() +} + const menuBubbleButton = submenuButton const openWorkspace = () => { |