-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: include program, programStage, trackedEntityType in map request (#…
…2011) Fixes: https://jira.dhis2.org/browse/DHIS2-11924 Include program, programStage, and trackedEntityType in the map request. This information is needed for the map legend.
- Loading branch information
1 parent
c631fa6
commit 0d96c84
Showing
4 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps' | ||
import { dashboards } from '../../../assets/backends/sierraLeone_236' | ||
import { getDashboardItem, mapSel } from '../../../elements/dashboardItem' | ||
import { | ||
dashboardTitleSel, | ||
dashboardChipSel, | ||
} from '../../../elements/viewDashboard' | ||
import { EXTENDED_TIMEOUT } from '../../../support/utils' | ||
|
||
const mapItemUid = dashboards['Cases Malaria'].items.map.itemUid | ||
|
||
Given('I open the Cases Malaria dashboard', () => { | ||
const title = 'Cases Malaria' | ||
cy.get(dashboardChipSel, EXTENDED_TIMEOUT).contains(title).click() | ||
|
||
cy.location().should(loc => { | ||
expect(loc.hash).to.equal(dashboards[title].route) | ||
}) | ||
|
||
cy.get(dashboardTitleSel).should('be.visible').and('contain', title) | ||
cy.get(mapSel, EXTENDED_TIMEOUT).should('exist') | ||
}) | ||
|
||
When('I hover over the map legend button', () => { | ||
getDashboardItem(mapItemUid) | ||
.find('.dhis2-map-legend-button', EXTENDED_TIMEOUT) | ||
.trigger('mouseover') | ||
}) | ||
|
||
Then('the legend title shows the tracked entity name', () => { | ||
cy.get('.dhis2-map-legend-title') | ||
.contains('Malaria case registration') | ||
.should('be.visible') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters