-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathinterpretations.cy.js
More file actions
41 lines (33 loc) · 1.24 KB
/
interpretations.cy.js
File metadata and controls
41 lines (33 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { VIS_TYPE_LINE } from '@dhis2/analytics'
import {
expectAOTitleToBeValue,
expectVisualizationToBeVisible,
} from '../elements/chart.js'
import { openAOByName } from '../elements/fileMenu/index.js'
import { goToStartPage } from '../elements/startScreen.js'
describe('Interpretations', () => {
it('opens the interpretations modal on a saved AO', () => {
const ao = {
name: 'ANC: 1-3 trend lines last 12 months',
type: VIS_TYPE_LINE,
}
// Open the saved AO
goToStartPage()
openAOByName(ao.name)
expectAOTitleToBeValue(ao.name)
expectVisualizationToBeVisible(ao.type)
// Open the interpretations panel
cy.getBySel('dhis2-analytics-interpretationsanddetailstoggler').click()
cy.getBySel('interpretations-list')
.find('button')
.contains('See interpretation')
.click()
cy.getBySel('interpretation-modal').should('be.visible')
cy.get('.highcharts-container').should('be.visible')
cy.getBySel('interpretation-modal')
.find('button')
.contains('Hide interpretation')
.click()
cy.getBySel('interpretation-modal').should('not.exist')
})
})