diff --git a/cypress/integration/view/item_context_menu.feature b/cypress/integration/view/item_context_menu.feature index 0702bcea1..d6d9821d4 100644 --- a/cypress/integration/view/item_context_menu.feature +++ b/cypress/integration/view/item_context_menu.feature @@ -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 diff --git a/cypress/integration/view/item_context_menu/show_interpretations.js b/cypress/integration/view/item_context_menu/show_interpretations.js index bcc4dc5f4..26819c861 100644 --- a/cypress/integration/view/item_context_menu/show_interpretations.js +++ b/cypress/integration/view/item_context_menu/show_interpretations.js @@ -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') diff --git a/cypress/integration/view/offline.feature b/cypress/integration/view/offline.feature index 3aac996ec..7ef930560 100644 --- a/cypress/integration/view/offline.feature +++ b/cypress/integration/view/offline.feature @@ -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 @@ -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 diff --git a/cypress/integration/view/offline/offline.js b/cypress/integration/view/offline/offline.js index f530430e7..3494961f6 100644 --- a/cypress/integration/view/offline/offline.js +++ b/cypress/integration/view/offline/offline.js @@ -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 @@ -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 => { @@ -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) { @@ -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) diff --git a/package.json b/package.json index 9531e1ccf..46ee6e9f7 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 49e8671fc..75b7b5f61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2306,7 +2306,7 @@ i18next "^10.3" moment "^2.24.0" -"@dhis2/d2-ui-core@7.3.2", "@dhis2/d2-ui-core@^7.3.2": +"@dhis2/d2-ui-core@7.3.2": 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== @@ -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/d2-ui-core@7.3.3", "@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" @@ -2334,10 +2345,10 @@ prop-types "^15.5.10" react-portal "^4.1.5" -"@dhis2/d2-ui-mentions-wrapper@7.3.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/d2-ui-mentions-wrapper@7.3.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" @@ -2363,21 +2374,21 @@ babel-runtime "^6.26.0" prop-types "^15.5.10" -"@dhis2/d2-ui-rich-text@7.3.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/d2-ui-rich-text@7.3.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/d2-ui-sharing-dialog@7.3.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/d2-ui-sharing-dialog@7.3.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" @@ -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"