From 0948d47c3a894f2d164c8cf8f81055c15e3306a7 Mon Sep 17 00:00:00 2001 From: Tomas Engebretsen Date: Wed, 18 Oct 2023 09:44:01 +0200 Subject: [PATCH] Fix file upload test (#11378) --- .../src/fixtures/{DataModel.xsd => testdatamodel.xsd} | 0 .../testing/cypress/src/integration/studio/datamodel.js | 9 ++++----- 2 files changed, 4 insertions(+), 5 deletions(-) rename frontend/testing/cypress/src/fixtures/{DataModel.xsd => testdatamodel.xsd} (100%) diff --git a/frontend/testing/cypress/src/fixtures/DataModel.xsd b/frontend/testing/cypress/src/fixtures/testdatamodel.xsd similarity index 100% rename from frontend/testing/cypress/src/fixtures/DataModel.xsd rename to frontend/testing/cypress/src/fixtures/testdatamodel.xsd diff --git a/frontend/testing/cypress/src/integration/studio/datamodel.js b/frontend/testing/cypress/src/integration/studio/datamodel.js index f9b44a68c35..ee47df9285f 100644 --- a/frontend/testing/cypress/src/integration/studio/datamodel.js +++ b/frontend/testing/cypress/src/integration/studio/datamodel.js @@ -47,10 +47,9 @@ context('datamodel', () => { it('Allows to upload an XSD file and displays the data model when the upload is complete', () => { cy.findAllByTestId(testids.fileSelectorInput) .first() - .selectFile('src/fixtures/DataModel.xsd', { force: true }); - cy.findByRole('combobox', { name: texts['schema_editor.choose_model'] }).should( - 'have.value', - '/App/models/DataModel.schema.json', - ); + .selectFile('src/fixtures/testdatamodel.xsd', { force: true }); + cy.findByRole('combobox', { name: texts['schema_editor.choose_model'] }) + .invoke('val') + .should('match', /\/testdatamodel.schema.json$/); }); });