Skip to content

Commit

Permalink
chore: try different coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Jan 23, 2024
1 parent 797d262 commit 171a488
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cypress/integration/orgUnitInfo.cy.js
Original file line number Diff line number Diff line change
@@ -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()

Expand All @@ -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')
Expand All @@ -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')
})
Expand Down

0 comments on commit 171a488

Please sign in to comment.