diff --git a/cypress/e2e/test-nextcloud.cy.js b/cypress/e2e/test-nextcloud.cy.js index 265a8a619473ffebaea68797325892f03555e14d..614990480775bec6c902bca53ae789a12f5e68f3 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')