From 546b487bee8726d90d60ca32a6e10abb61c46600 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Thu, 2 Jan 2025 15:14:03 +0100 Subject: [PATCH] chore: use visualizations without this year period This is to avoid failing tests in the beginning of a new year when the new data is not added to the test DB yet. --- cypress/integration/interpretations.cy.js | 6 +++--- cypress/integration/save.cy.js | 6 +++--- cypress/utils/data.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cypress/integration/interpretations.cy.js b/cypress/integration/interpretations.cy.js index c710a3d4a3..a2a2889314 100644 --- a/cypress/integration/interpretations.cy.js +++ b/cypress/integration/interpretations.cy.js @@ -1,4 +1,4 @@ -import { VIS_TYPE_BAR } from '@dhis2/analytics' +import { VIS_TYPE_LINE } from '@dhis2/analytics' import { expectAOTitleToBeValue, expectVisualizationToBeVisible, @@ -9,8 +9,8 @@ import { goToStartPage } from '../elements/startScreen.js' describe('Interpretations', () => { it('opens the interpretations modal on a saved AO', () => { const ao = { - name: 'ANC: 1 and 3 coverage Yearly', - type: VIS_TYPE_BAR, + name: 'ANC: 1-3 trend lines last 12 months', + type: VIS_TYPE_LINE, } // Open the saved AO diff --git a/cypress/integration/save.cy.js b/cypress/integration/save.cy.js index 70c983dd9a..ba43444a71 100644 --- a/cypress/integration/save.cy.js +++ b/cypress/integration/save.cy.js @@ -17,7 +17,7 @@ import { selectIndicators, selectDataElements, clickDimensionModalUpdateButton, - deselectOrgUnitTreeItem, + selectOrgUnitTreeItem, } from '../elements/dimensionModal/index.js' import { openDimension } from '../elements/dimensionsPanel.js' import { @@ -185,7 +185,7 @@ describe('saving an AO', () => { }) it('"save" a copied AO created by others works after editing', () => { - const TEST_VIS_BY_OTHERS_NAME = 'ANC: 1-3 dropout rate Yearly' + const TEST_VIS_BY_OTHERS_NAME = 'ANC: 1-3 trend lines last 12 months' const TEST_VIS_BY_OTHERS_NAME_UPDATED = `${TEST_VIS_BY_OTHERS_NAME} - updated` // navigates to the start page and opens an AO created by others @@ -200,7 +200,7 @@ describe('saving an AO', () => { // edits the AO openDimension(DIMENSION_ID_ORGUNIT) - deselectOrgUnitTreeItem('Western Area') + selectOrgUnitTreeItem('Western Area') clickDimensionModalUpdateButton() // saves AO using "Save" diff --git a/cypress/utils/data.js b/cypress/utils/data.js index c107228a98..bcbba9a84e 100644 --- a/cypress/utils/data.js +++ b/cypress/utils/data.js @@ -47,7 +47,7 @@ export const visTypes = [ export const TEST_AOS = [ { - name: 'Commodities: Child health consumption districts this year', + name: 'ANC: ANC 3 coverage by districts last 12 months', type: VIS_TYPE_COLUMN, }, {