diff options
author | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-07-14 18:37:23 +0300 |
---|---|---|
committer | Vinicius Reis (Rebase PR Action) <luiz.vinicius73@gmail.com> | 2022-07-19 15:05:09 +0300 |
commit | 6390dd9ea08a020b586f18b8b449bbb621fbea40 (patch) | |
tree | 004acb314f5fb483c3420a83a4033fb89ac40fe2 /cypress | |
parent | 61c83d769908a6fd378270c2785593699485118c (diff) |
♿️ (#2381): make placeholder accessible by keyboard navigation
Allows to keyboard focus on placeholder and create a new workspace using enter and space keys.
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/e2e/workspace.spec.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js index 5d78763bb..cf8a414a5 100644 --- a/cypress/e2e/workspace.spec.js +++ b/cypress/e2e/workspace.spec.js @@ -264,6 +264,39 @@ describe('Workspace', function() { }) }) + describe('create Readme.md', () => { + const checkContent = () => { + const txt = Cypress.currentTest.title + + cy.getEditor().find('[data-text-el="editor-content-wrapper"]').click() + + cy.getContent() + .type(txt) + .should('contain', txt) + } + + it('click', () => { + cy.get('#rich-workspace .empty-workspace').click() + checkContent() + }) + + it('enter', () => { + cy.get('#rich-workspace .empty-workspace').type('{enter}') + checkContent() + }) + + it('spacebar', () => { + cy.get('#rich-workspace .empty-workspace') + .trigger('keyup', { + keyCode: 32, + which: 32, + shiftKey: false, + ctrlKey: false, + force: true, + }) + checkContent() + }) + }) }) const menuButton = (name) => { |