Skip to content

Commit

Permalink
fix(deps): data visualizer plugin [v38] (DHIS2-16888) (#2915)
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenrikoverland authored Apr 10, 2024
1 parent 10aea7d commit 2603a9d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
10 changes: 5 additions & 5 deletions cypress/integration/edit/edit_dashboard/show_description.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
import { clickViewActionButton } from '../../../elements/viewDashboard'
import { getApiBaseUrl } from '../../../support/server/utils'
import { clickViewActionButton } from '../../../elements/viewDashboard.js'
import { getApiBaseUrl } from '../../../support/server/utils.js'

const RESP_CODE_200 = 200
const RESP_CODE_201 = 201
const SHOW_DESC_RESP_CODE_FAIL = 409
const RESP_CODE_FAIL = 409

before(() => {
//ensure that the description is not currently shown
Expand Down Expand Up @@ -45,14 +45,14 @@ When('I click to hide the description', () => {
// Error scenario
When('clicking to show description fails', () => {
cy.intercept('PUT', 'userDataStore/dashboard/showDescription', {
statusCode: SHOW_DESC_RESP_CODE_FAIL,
statusCode: RESP_CODE_FAIL,
}).as('showDescriptionFails')

clickViewActionButton('More')
cy.contains('Show description').click()
cy.wait('@showDescriptionFails')
.its('response.statusCode')
.should('eq', SHOW_DESC_RESP_CODE_FAIL)
.should('eq', RESP_CODE_FAIL)
})

Then(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Then('the Period filter is applied to the dashboard', () => {
})

/*
Scenario: I add an Organisation init filter
Scenario: I add an Organisation unit filter
*/

Then('the Organisation unit filter is applied to the dashboard', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { When, Then } from 'cypress-cucumber-preprocessor/steps'
import {
dragHandleSel,
dashboardsBarSel,
} from '../../../elements/viewDashboard'
import { EXTENDED_TIMEOUT } from '../../../support/utils'
} from '../../../elements/viewDashboard.js'
import { EXTENDED_TIMEOUT } from '../../../support/utils.js'

const RESP_CODE_200 = 200
const RESP_CODE_201 = 201
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import {
dashboardTitleSel,
dashboardsBarContainerSel,
showMoreLessSel,
} from '../../../elements/viewDashboard'
import { getApiBaseUrl } from '../../../support/server/utils'
import { EXTENDED_TIMEOUT } from '../../../support/utils'
} from '../../../elements/viewDashboard.js'
import { getApiBaseUrl } from '../../../support/server/utils.js'
import { EXTENDED_TIMEOUT } from '../../../support/utils.js'

const MIN_DASHBOARDS_BAR_HEIGHT = 71
const MAX_DASHBOARDS_BAR_HEIGHT = 431

const RESP_CODE_200 = 200
const RESP_CODE_201 = 201

beforeEach(() => {
cy.request({
method: 'PUT',
Expand All @@ -18,7 +21,9 @@ beforeEach(() => {
'content-type': 'application/json',
},
body: '1',
}).then(response => expect(response.status).to.be.oneOf([200, 201]))
}).then(response =>
expect(response.status).to.be.oneOf([RESP_CODE_201, RESP_CODE_200])
)
})

When('I toggle show more dashboards', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
import { getApiBaseUrl } from '../../../support/server/utils'
import { getApiBaseUrl } from '../../../support/server/utils.js'

// Error scenario
const RESP_CODE_200 = 200
const RESP_CODE_201 = 201
const RESP_CODE_FAIL = 409

before(() => {
//first ensure that the description is not currently shown
Expand All @@ -12,7 +14,9 @@ before(() => {
'content-type': 'application/json',
},
body: 'false',
}).then(response => expect(response.status).to.be.oneOf([200, 201]))
}).then(response =>
expect(response.status).to.be.oneOf([RESP_CODE_201, RESP_CODE_200])
)
})

When('clicking to show description fails', () => {
Expand All @@ -25,7 +29,7 @@ When('clicking to show description fails', () => {

cy.wait('@showDescriptionFails')
.its('response.statusCode')
.should('eq', 409)
.should('eq', RESP_CODE_FAIL)
})

Then(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@dhis2/d2-ui-interpretations": "^7.4.1",
"@dhis2/d2-ui-mentions-wrapper": "^7.4.1",
"@dhis2/d2-ui-rich-text": "^7.4.1",
"@dhis2/data-visualizer-plugin": "^38.3.6",
"@dhis2/data-visualizer-plugin": "^38.3.27",
"@dhis2/ui": "^8.12.4",
"@krakenjs/post-robot": "^11.0.0",
"classnames": "^2.3.1",
Expand Down
19 changes: 10 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2152,12 +2152,13 @@
classnames "^2.3.1"
prop-types "^15.7.2"

"@dhis2/analytics@^21.8.1":
version "21.8.1"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-21.8.1.tgz#2e04e80cb2f80336c80a6a1605c295702e1f8d65"
integrity sha512-UXkCmZEWhwMaJgx5kJVP7dCr8evbTuyQaPi9jZGvbPeClX+2dg98ewyaVQ3AVdAc+DXdY93uG9nWAygrGXVuBA==
"@dhis2/analytics@^21.9.1":
version "21.9.1"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-21.9.1.tgz#8ed76ac090cd3215885591813ccbbe8b18d1b402"
integrity sha512-klH32VRLefd2X9KdsbzQJxhKHeMidwv2MSVb24vHUySmiBZ6JBeS7ZsxTQhudQEa6abYLEtpgENljKAtcJ8lxA==
dependencies:
"@dhis2/d2-ui-translation-dialog" "^7.3.1"
"@dhis2/multi-calendar-dates" "1.0.0"
classnames "^2.3.1"
d2-utilizr "^0.2.16"
d3-color "^1.2.3"
Expand Down Expand Up @@ -2478,12 +2479,12 @@
react-select "^2.0.0"
rxjs "^5.5.7"

"@dhis2/data-visualizer-plugin@^38.3.6":
version "38.3.6"
resolved "https://registry.yarnpkg.com/@dhis2/data-visualizer-plugin/-/data-visualizer-plugin-38.3.6.tgz#0a99c1996f9d74897b4e490166661ab8a6a0cbbf"
integrity sha512-hPuUFfFB1PcBi8C8lD/ObCDBLzbN3OaZx/Q6Nrmt2bSC19aRT5xsQDlvi4b07jtxqUE9YO4YvU1dPn6bF2Oz1w==
"@dhis2/data-visualizer-plugin@^38.3.27":
version "38.3.27"
resolved "https://registry.yarnpkg.com/@dhis2/data-visualizer-plugin/-/data-visualizer-plugin-38.3.27.tgz#cbaadf86b8deea3f989fa52809ddf15e4897bff6"
integrity sha512-eUF1qynfzDPAfx5RQZArtUTwTGTStbFoXtMkFtyRsR+Gr2nZxJE5cEkr4smjOSvYK7zitOHYcxrxIr74qGsZ5Q==
dependencies:
"@dhis2/analytics" "^21.8.1"
"@dhis2/analytics" "^21.9.1"
"@dhis2/app-runtime" "^3.2.0"
"@dhis2/d2-i18n" "^1.1.0"
"@dhis2/ui" "^7.7.3"
Expand Down

0 comments on commit 2603a9d

Please sign in to comment.