From 0928999f84ba3a88d75ef2b7919931778c42d08a Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Tue, 25 Jun 2024 14:04:00 +0200 Subject: [PATCH] Click to open newly created office document in test --- cypress/e2e/test-nextcloud.cy.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/test-nextcloud.cy.js b/cypress/e2e/test-nextcloud.cy.js index 265a8a61..61499048 100644 --- a/cypress/e2e/test-nextcloud.cy.js +++ b/cypress/e2e/test-nextcloud.cy.js @@ -56,10 +56,14 @@ describe('Test nextcloud', () => { // Create a new OO document with a random file name cy.visit('apps/files') cy.contains('button', 'New').click() - const file_rand = '{selectAll}{del}test-' + Math.random().toString(16).substr(2, 12) + '.docx' + const file_rand = 'test-' + Math.random().toString(16).substr(2, 12) cy.contains('button', 'New document').click() - cy.get('input[placeholder="Filename"]').type(file_rand) + cy.get('input[placeholder="Filename"]').type('{selectAll}{del}' + file_rand + '.docx') cy.contains('span', 'Create').click() + // Before, creating the new document this way would also open it + // automatically. It seems with newer nextcloud/onlyoffice that is no + // longer the case. + cy.contains('span', file_rand).should('exist').click() // Test Onlyoffice cy.frameLoaded('#onlyofficeFrame') -- GitLab