Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upgrade d2-ui 7.3.3 #1932

Merged
merged 12 commits into from
Sep 3, 2021
10 changes: 5 additions & 5 deletions cypress/integration/view/item_context_menu.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Feature: Item context menu
When I click Open in Data Visualizer app on a chart dashboard item
Then the chart is opened in the Data Visualizer app

# @nonmutating
# Scenario: Open the interpretations panel
# Given I open the "Delivery" dashboard
# When I click Show details and interpretations on a chart dashboard item
# Then the interpretations panel is displayed
@nonmutating
Scenario: Open the interpretations panel
Given I open the "Delivery" dashboard
When I click Show details and interpretations on a chart dashboard item
Then the interpretations panel is displayed

@nonmutating
Scenario: Text item does not have a context menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When(
Then('the interpretations panel is displayed', () => {
getDashboardItem(chartItemUid)
.find(itemDetailsSel)
.contains('Chart details')
.contains('Visualization details')
.scrollIntoView()
.should('be.visible')

Expand Down
13 changes: 7 additions & 6 deletions cypress/integration/view/offline.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Feature: Offline dashboard

Scenario: I cache an uncached dashboard
Given I create a cached and uncached dashboard
Given I create two dashboards
When I cache one of the dashboards
Then the cached dashboard has a Last Updated time and chip icon
And the uncached dashboard does not have a Last Updated time and no chip icon

Expand Down Expand Up @@ -58,11 +59,11 @@ Feature: Offline dashboard
# And connectivity is turned off
# Then it is not possible to change sharing settings

# Scenario: The interpretations panel is open when connectivity is lost
# Given I open a cached dashboard
# And I open the interpretations panel
# When connectivity is turned off
# Then it is not possible to interact with interpretations
Scenario: The interpretations panel is open when connectivity is lost
Given I open a cached dashboard
And I open the interpretations panel
When connectivity is turned off
Then it is not possible to interact with interpretations


Scenario: I delete the cached and uncached dashboard
Expand Down
29 changes: 15 additions & 14 deletions cypress/integration/view/offline/offline.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const CACHED_DASHBOARD_TITLE = 'aa ca' + new Date().toUTCString().slice(-12, -4)

const createDashboard = cacheState => {
const cachedDashboard = cacheState === CACHED
cy.get(newButtonSel).click()
cy.get(newButtonSel, EXTENDED_TIMEOUT).click()
cy.get(titleInputSel, EXTENDED_TIMEOUT).should('be.visible')

const title = cachedDashboard
Expand All @@ -54,9 +54,6 @@ const createDashboard = cacheState => {
closeMenu()
clickEditActionButton('Save changes')
cy.get(dashboardTitleSel, EXTENDED_TIMEOUT).should('be.visible')
if (cachedDashboard) {
cacheDashboard()
}
}

const openDashboard = title => {
Expand All @@ -73,12 +70,6 @@ const enterEditMode = () => {
cy.get(titleInputSel, EXTENDED_TIMEOUT).should('be.visible')
}

const cacheDashboard = () => {
clickViewActionButton('More')
cy.contains(MAKE_AVAILABLE_OFFLINE_TEXT).click()
cy.contains(OFFLINE_DATA_LAST_UPDATED_TEXT).should('be.visible')
}

const checkCorrectMoreOptions = cacheState => {
clickViewActionButton('More')
if (cacheState === CACHED) {
Expand Down Expand Up @@ -127,14 +118,24 @@ const deleteDashboard = dashboardTitle => {

// Scenario: I cache an uncached dashboard

Given('I create a cached and uncached dashboard', () => {
createDashboard(CACHED)
Given('I create two dashboards', () => {
cy.log('create the uncached dashboard')
createDashboard(UNCACHED)
createDashboard(CACHED)
})

Then('the cached dashboard has a Last Updated time and chip icon', () => {
When('I cache one of the dashboards', () => {
openDashboard(CACHED_DASHBOARD_TITLE)
cy.contains(OFFLINE_DATA_LAST_UPDATED_TEXT).should('be.visible')
clickViewActionButton('More')
cy.contains(MAKE_AVAILABLE_OFFLINE_TEXT, EXTENDED_TIMEOUT).click()
cy.contains(OFFLINE_DATA_LAST_UPDATED_TEXT, EXTENDED_TIMEOUT).should(
'be.visible'
)
})

Then('the cached dashboard has a Last Updated time and chip icon', () => {
// openDashboard(CACHED_DASHBOARD_TITLE)
// cy.contains(OFFLINE_DATA_LAST_UPDATED_TEXT).should('be.visible')

// check that the chip has the icon
cy.get(dashboardChipSel)
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"@dhis2/app-runtime": "^2.11.0",
"@dhis2/app-runtime-adapter-d2": "^1.1.0",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/d2-ui-core": "^7.3.2",
"@dhis2/d2-ui-interpretations": "^7.3.2",
"@dhis2/d2-ui-mentions-wrapper": "^7.3.2",
"@dhis2/d2-ui-rich-text": "^7.3.2",
"@dhis2/d2-ui-translation-dialog": "^7.3.2",
"@dhis2/d2-ui-core": "^7.3.3",
"@dhis2/d2-ui-interpretations": "^7.3.3",
"@dhis2/d2-ui-mentions-wrapper": "^7.3.3",
"@dhis2/d2-ui-rich-text": "^7.3.3",
"@dhis2/d2-ui-translation-dialog": "^7.3.3",
"@dhis2/data-visualizer-plugin": "^38.0.1",
"@dhis2/ui": "^6.20.0",
"classnames": "^2.3.1",
Expand Down
63 changes: 37 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,7 @@
i18next "^10.3"
moment "^2.24.0"

"@dhis2/[email protected]", "@dhis2/d2-ui-core@^7.3.2":
"@dhis2/[email protected]":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-core/-/d2-ui-core-7.3.2.tgz#45a969db714bc78aa76657cb0dd1bc18c593b6ff"
integrity sha512-yrg+oyyEofjk7KqDdHM2ggUSWqYU2aBLIcAn0Hqz4wenm3tbDlWgRoo0is4E601WZc80+AtzoX8ouGIsJpO6fQ==
Expand All @@ -2317,14 +2317,25 @@
material-ui "^0.20.0"
rxjs "^5.5.7"

"@dhis2/d2-ui-interpretations@^7.3.2":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-interpretations/-/d2-ui-interpretations-7.3.2.tgz#3d10e0f300e32a49ecd11d5e20ea7078ed76241a"
integrity sha512-8cbgHm8OQt6+r+GoZWrEiNfneIDWPrTE6fUwZ9SZpiBooLR3JBQB24d1HxAtPhIWMIg013Tre+010+3SbMzhWQ==
"@dhis2/[email protected]", "@dhis2/d2-ui-core@^7.3.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-core/-/d2-ui-core-7.3.3.tgz#305dd9d4a1fe65672ace305c530230dfe7f89030"
integrity sha512-/LFTo83ym7Nwirj+Ecq5OO/Fpy8OrANOUQQGRqpwdW24h0Qm77WTZRPmpaNMg/c3eMhMBVtQbcwKlqE+hDSGOQ==
dependencies:
babel-runtime "^6.26.0"
d2 "~31.7"
lodash "^4.17.10"
material-ui "^0.20.0"
rxjs "^5.5.7"

"@dhis2/d2-ui-interpretations@^7.3.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-interpretations/-/d2-ui-interpretations-7.3.3.tgz#9bd45f548dc7b51ddd938d51d24a3be043ab7b7a"
integrity sha512-6bREjYPwmniN7kPVnEmAbuA3xPd/YMcaTTo2DvXHcYPrmeVGxucuiogm0pJBsX+DFNDgC4d8Dlcly4d0URhEPQ==
dependencies:
"@dhis2/d2-ui-mentions-wrapper" "7.3.2"
"@dhis2/d2-ui-rich-text" "7.3.2"
"@dhis2/d2-ui-sharing-dialog" "7.3.2"
"@dhis2/d2-ui-mentions-wrapper" "7.3.3"
"@dhis2/d2-ui-rich-text" "7.3.3"
"@dhis2/d2-ui-sharing-dialog" "7.3.3"
"@material-ui/core" "^3.3.1"
"@material-ui/icons" "^3.0.1"
babel-runtime "^6.26.0"
Expand All @@ -2334,10 +2345,10 @@
prop-types "^15.5.10"
react-portal "^4.1.5"

"@dhis2/[email protected].2", "@dhis2/d2-ui-mentions-wrapper@^7.3.2":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-mentions-wrapper/-/d2-ui-mentions-wrapper-7.3.2.tgz#af9321993049c92c54cf68ea96c20888afc1f336"
integrity sha512-NYbTGUXgGMpPTwSV7EjBPNZMABKPf8m2FKvj5/IynPsdbiYi6QT5ShNVzD7+k4j1UnG5AavMDIcBwpH0qYV40Q==
"@dhis2/[email protected].3", "@dhis2/d2-ui-mentions-wrapper@^7.3.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-mentions-wrapper/-/d2-ui-mentions-wrapper-7.3.3.tgz#c927c1fef27821db4c24f54c180cdd5f19c22e2b"
integrity sha512-WK0EoV0FBF4rItlOZAAbQAVvHM+n3Eq7nBfUxcyTqpTEeD5HuGhzLTlkKoS68jrj1pGEepbeYhBXtgdCT/hWqQ==
dependencies:
"@material-ui/core" "^3.3.1"
lodash "^4.17.10"
Expand All @@ -2363,21 +2374,21 @@
babel-runtime "^6.26.0"
prop-types "^15.5.10"

"@dhis2/[email protected].2", "@dhis2/d2-ui-rich-text@^7.3.2":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-rich-text/-/d2-ui-rich-text-7.3.2.tgz#f6e67cb64d3473896cc06e5bba7d9103c3de5a49"
integrity sha512-KGkSwbrEDiKkwc3qKZLbsb/4k1xVsKsValveYbgxNdvMuQpTqB1Ew/NJSIdWgK+Q5iLMMSN1QYk5LgPoOUMMmg==
"@dhis2/[email protected].3", "@dhis2/d2-ui-rich-text@^7.3.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-rich-text/-/d2-ui-rich-text-7.3.3.tgz#4fdb8de8a56edc924f98768efc1fead47450f834"
integrity sha512-3uVI4jT4MpwE4JYuJarTHEtf+fX0kt4JCKqgUUaRKW0Oul6/E1zm5vpHccPlhUVRtdmD/epcJ4AmWDznqp5rQg==
dependencies:
babel-runtime "^6.26.0"
markdown-it "^8.4.2"
prop-types "^15.6.2"

"@dhis2/[email protected].2":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-sharing-dialog/-/d2-ui-sharing-dialog-7.3.2.tgz#081cf3fcddb3b0095755263dc241ffda29bf6a85"
integrity sha512-1vywqSJudJFYx5sxXVx+lO3IrApqqQlM2zykWFAcjNElYeYZvBycATk0szTQoJvhCP6M90rMNbuKPpYiTE6BgQ==
"@dhis2/[email protected].3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-sharing-dialog/-/d2-ui-sharing-dialog-7.3.3.tgz#890e072b6eb0e0064548916737966371cc935c61"
integrity sha512-xq3/8ZnstHFiholePV+KB0JSV1N7zK87z/7gH4grSIaQkeRrDeTXkPMM8epz4BHwSBv39eI0AAzXoJA8F3EQjw==
dependencies:
"@dhis2/d2-ui-core" "7.3.2"
"@dhis2/d2-ui-core" "7.3.3"
"@material-ui/core" "^3.3.1"
"@material-ui/icons" "^3.0.1"
babel-runtime "^6.26.0"
Expand All @@ -2386,12 +2397,12 @@
recompose "^0.26.0"
rxjs "^5.5.7"

"@dhis2/d2-ui-translation-dialog@^7.3.1", "@dhis2/d2-ui-translation-dialog@^7.3.2":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-translation-dialog/-/d2-ui-translation-dialog-7.3.2.tgz#43ac0ca5baf69e14e0a75b603e47f48697163031"
integrity sha512-FKZnIppBRIdMMsrjg/VM9RPTd/fi+l+BKgNmf07ov3qBY0To4hNo2iaoKBmo+hQdEsL7ADFctxgmsn56n7CrlA==
"@dhis2/d2-ui-translation-dialog@^7.3.1", "@dhis2/d2-ui-translation-dialog@^7.3.3":
version "7.3.3"
resolved "https://registry.yarnpkg.com/@dhis2/d2-ui-translation-dialog/-/d2-ui-translation-dialog-7.3.3.tgz#913e6ec74d031601845e7c0a461c08d13367bba6"
integrity sha512-3n5RjguEm4ua802TXnOTO00tzl88IY64lstPe1cpMbhbuwHW/JUdBMdDuBMmlyg6PkKm0JD9kIsvcGH7cUawPw==
dependencies:
"@dhis2/d2-ui-core" "7.3.2"
"@dhis2/d2-ui-core" "7.3.3"
"@material-ui/core" "^3.3.1"
"@material-ui/icons" "^3.0.1"
babel-runtime "^6.26.0"
Expand Down