From 171a4884e1231d49a6f8889c97053b429bd27ca3 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 23 Jan 2024 13:22:02 +0100 Subject: [PATCH] chore: try different coordinate --- cypress/integration/orgUnitInfo.cy.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cypress/integration/orgUnitInfo.cy.js b/cypress/integration/orgUnitInfo.cy.js index 19ad10c7d..cc7439f09 100644 --- a/cypress/integration/orgUnitInfo.cy.js +++ b/cypress/integration/orgUnitInfo.cy.js @@ -1,16 +1,15 @@ -// import { ThematicLayer } from '../elements/thematic_layer.js' -import { EXTENDED_TIMEOUT } from '../support/util.js' +import { CURRENT_YEAR, EXTENDED_TIMEOUT } from '../support/util.js' describe('OrgUnitInfo', () => { it('opens the panel for an OrgUnit', () => { - cy.visit('/?id=ZBjCfSaLSqD', EXTENDED_TIMEOUT) - cy.wait(5000) // eslint-disable-line cypress/no-unnecessary-waiting + cy.visit('/#/ZBjCfSaLSqD', EXTENDED_TIMEOUT) cy.get('canvas').should('be.visible') + cy.wait(5000) // eslint-disable-line cypress/no-unnecessary-waiting cy.get('#dhis2-map-container') .findByDataTest('dhis2-uicore-componentcover', EXTENDED_TIMEOUT) .should('not.exist') - cy.get('.dhis2-map').click(300, 100) //Click somewhere on the map + cy.get('.dhis2-map').click(350, 350) //Click somewhere on the map cy.get('.maplibregl-popup').contains('View profile').click() @@ -19,8 +18,8 @@ describe('OrgUnitInfo', () => { 'Organisation unit profile' ) - // TODO - find a way to ensure that "Bombali" is the orgunit that was clicked on - // cy.getByDataTest('org-unit-info').find('h3').contains('Bombali') + // // TODO - find a way to ensure that "Bombali" is the orgunit that was clicked on + // // cy.getByDataTest('org-unit-info').find('h3').contains('Bombali') cy.getByDataTest('org-unit-data') .findByDataTest('button-previous-year') @@ -30,7 +29,7 @@ describe('OrgUnitInfo', () => { .findByDataTest('dhis2-uicore-circularloader') .should('not.exist') - cy.getByDataTest('year-select').contains('2022') + cy.getByDataTest('year-select').contains(CURRENT_YEAR - 1) cy.getByDataTest('org-unit-data-table').contains('Expected pregnancies') })