From 845e677e68eb024a0c7de17c7feb311f8981eeb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 20 Aug 2024 12:52:49 +0200 Subject: [PATCH] Revert "ci: Fix selector for saveas button" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f790b57e565d646a7b658515191bfb7b2f2df4f6. Signed-off-by: Julius Härtl --- .github/workflows/cypress-e2e.yml | 1 + cypress/e2e/integration.spec.js | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cypress-e2e.yml b/.github/workflows/cypress-e2e.yml index 21fcf8f8a3..cc1ab0586a 100644 --- a/.github/workflows/cypress-e2e.yml +++ b/.github/workflows/cypress-e2e.yml @@ -171,6 +171,7 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} SPLIT: 3 SPLIT_INDEX: ${{ env.container_index }} + CODE_RELEASE: ${{ matrix.code-image }} - name: Upload test failure screenshots uses: actions/upload-artifact@v2 diff --git a/cypress/e2e/integration.spec.js b/cypress/e2e/integration.spec.js index 25fadc40a7..8d6d9e066d 100644 --- a/cypress/e2e/integration.spec.js +++ b/cypress/e2e/integration.spec.js @@ -2,6 +2,8 @@ * SPDX-FileCopyrightText: 2023 Julius Härtl * SPDX-License-Identifier: AGPL-3.0-or-later */ +const isNightly = Cypress.env('CODE_RELEASE') === 'nightly' + describe('Nextcloud integration', function() { let randUser @@ -61,19 +63,21 @@ describe('Nextcloud integration', function() { cy.get('#tab-version_vue .version__info__label').contains('Current version') }) - // Currently it seems that Collabora is missing the save as button it('Save as', function() { + // Grouped save button is currently only fixed on Collabora nightly + const exportFilename = isNightly ? 'document.rtf' : 'document.odt' cy.get('@loleafletframe').within(() => { cy.get('#File-tab-label').click() - cy.get('#file-saveas').click() - // FIXME: Seems currently broken, so let's skip this step - // cy.get('#saveas-entries #saveas-entry-1').click() + cy.get(isNightly ? '#saveas' : '#file-saveas').click() + if (isNightly) { + cy.get('#saveas-entries #saveas-entry-1').click() + } }) cy.get('.saveas-dialog').should('be.visible') cy.get('.saveas-dialog input[type=text]') .should('be.visible') - .should('have.value', '/document.odt') + .should('have.value', `/${exportFilename}`) cy.get('.saveas-dialog button.button-vue--vue-primary').click() @@ -85,7 +89,7 @@ describe('Nextcloud integration', function() { // FIXME: We should not need to reload cy.get('.breadcrumb__crumbs a').eq(0).click({ force: true }) - cy.openFile('document.odt') + cy.openFile(exportFilename) }) it('Open locally', function() {