From 276510f1512542e9c67d4cb59e9b6b549a293f08 Mon Sep 17 00:00:00 2001 From: Tiago Gaspar Date: Tue, 18 Feb 2025 14:46:05 +0000 Subject: [PATCH 1/2] fix/CDCTOOLBOX-465: Fix mergeDataflows --- src/services/copyConfig/dataflow/dataflow.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/copyConfig/dataflow/dataflow.js b/src/services/copyConfig/dataflow/dataflow.js index 427e9d57..a3b29b4a 100644 --- a/src/services/copyConfig/dataflow/dataflow.js +++ b/src/services/copyConfig/dataflow/dataflow.js @@ -191,6 +191,9 @@ class Dataflow { for (const resp of dataflows) { if (response.length === 0) { response.push(resp) + if (!response[0].result) { + response[0].result = [] + } } else if (resp.result) { response[0].result.push(...resp.result) response[0].resultCount += resp.resultCount From 2de543fc63ec391013f87c0010dad4a840e6f137 Mon Sep 17 00:00:00 2001 From: Tiago Gaspar Date: Tue, 18 Feb 2025 15:19:58 +0000 Subject: [PATCH 2/2] fix/CDCTOOLBOX-465: Fix cypress tests --- cypress/e2e/dataTest.js | 2 +- cypress/e2e/importAccounts.cy.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/dataTest.js b/cypress/e2e/dataTest.js index 91c287e7..b649a368 100644 --- a/cypress/e2e/dataTest.js +++ b/cypress/e2e/dataTest.js @@ -28,7 +28,7 @@ const emailExampleFile = 'email-templates.zip' const smsExampleFile = 'sms-templates.zip' const importEmailsFileHeaderText = 'Import email templates' const importSmsFileHeaderText = 'Import SMS templates' -const importEmailTemplatesErrorMessage = `Invalid ApiKey parameterInvalid ApiKey parameter` +const importEmailTemplatesErrorMessage = `Invalid ApiKey parameterInvalid APIKey identified. Invalid ApiKey parameter` const smsTemplatesIconName = 'SMS Templates' const smsTemplatesExportErrorMessage = 'Error getting SMS templates' const smsTemplatesExportErrorMessageDetail = 'Error getting SMS templatesThere was an error when getting the SMS templates or you do not have the required permissions to call it.' diff --git a/cypress/e2e/importAccounts.cy.js b/cypress/e2e/importAccounts.cy.js index 1cb68280..699b9263 100644 --- a/cypress/e2e/importAccounts.cy.js +++ b/cypress/e2e/importAccounts.cy.js @@ -59,9 +59,9 @@ describe('Import Account - Configuration Tree test suite', () => { cy.clearAllLocalStorage() cy.clearAllSessionStorage() }) - it('Should write on the search input and check the amount of checkboxes', () => { + it.only('Should write on the search input and check the amount of checkboxes', () => { cy.get('#importAccountsCard').get('ui5-tree').should('have.length', 20) - cy.get('#schemaInput').shadow().find('input').type('data.loyalty.rewardPoints').type('{enter}') + cy.get('#schemaInput').shadow().find('input').type('data.loyalty.rewardPoints{enter}') cy.get('#importAccountsCard').get('ui5-tree-item-custom').should('have.length', 3) }) })