From 2f6fa54bb8bf9f5ea4b58234d5895283d2e3ed46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Thu, 2 Sep 2021 12:43:58 +0200 Subject: [PATCH 1/4] fix: disable dirty check on exit --- src/pages/edit/ActionsBar.js | 12 +++++++----- yarn.lock | 6 ++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/pages/edit/ActionsBar.js b/src/pages/edit/ActionsBar.js index d8d659109..052c6a8a6 100644 --- a/src/pages/edit/ActionsBar.js +++ b/src/pages/edit/ActionsBar.js @@ -98,11 +98,13 @@ const EditBar = ({ dashboard, ...props }) => { } const onConfirmDiscard = () => { - if (props.isDirty) { - setConfirmDiscardDlgIsOpen(true) - } else { - onDiscardConfirmed() - } + // disabling dirty check in 2.37 + + // if (props.isDirty) { + // setConfirmDiscardDlgIsOpen(true) + // } else { + onDiscardConfirmed() + // } } const onDiscardConfirmed = () => { diff --git a/yarn.lock b/yarn.lock index f55e161f5..92b54655a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2372,7 +2372,7 @@ markdown-it "^8.4.2" prop-types "^15.6.2" -"@dhis2/d2-ui-sharing-dialog@7.3.2", "@dhis2/d2-ui-sharing-dialog@^7.3.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== @@ -2522,7 +2522,7 @@ "@dhis2/prop-types" "^1.6.4" classnames "^2.3.1" -"@dhis2/ui@^6.19.0", "@dhis2/ui@^6.20.0": +"@dhis2/ui@6.20.0", "@dhis2/ui@^6.19.0", "@dhis2/ui@^6.20.0": version "6.20.0" resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-6.20.0.tgz#00473fdec2dfb40d351fefcba379cc5f96472311" integrity sha512-l/ClExMi21FPIEfMg2bCvlLLUOx8r6s+3ZJudkMLtqSZvteZV9BYyPBUr2EyACBrtmwIbwvj71TBfZ3D6wSx8Q== @@ -17860,8 +17860,10 @@ watchpack@^1.7.4: resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== dependencies: + chokidar "^3.4.1" graceful-fs "^4.1.2" neo-async "^2.5.0" + watchpack-chokidar2 "^2.0.1" optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" From e3b9734f3d9700e2c8ce660a40a5e0b08438631e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Thu, 2 Sep 2021 12:59:31 +0200 Subject: [PATCH 2/4] fix: disable related cypress steps --- cypress/integration/edit/edit_dashboard.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/edit/edit_dashboard.feature b/cypress/integration/edit/edit_dashboard.feature index a1dc88b5b..fe9d2de88 100644 --- a/cypress/integration/edit/edit_dashboard.feature +++ b/cypress/integration/edit/edit_dashboard.feature @@ -23,7 +23,7 @@ Feature: Creating, editing and deleting dashboard When I choose to edit dashboard And dashboard title is added And I click Exit without saving - And I decide to continue editing + # And I decide to continue editing Then the dashboard displays in edit mode # @mutating @@ -42,7 +42,7 @@ Feature: Creating, editing and deleting dashboard When I choose to edit dashboard And dashboard title is added And I click Exit without saving - And I confirm I want to discard changes + # And I confirm I want to discard changes Then the dashboard displays in view mode @mutating From 858a8f13af6bf9fb9629c06ad2dbf9258df00d99 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Thu, 2 Sep 2021 13:46:30 +0200 Subject: [PATCH 3/4] fix: disable one more place --- cypress/integration/edit/filter_restrict.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/edit/filter_restrict.feature b/cypress/integration/edit/filter_restrict.feature index dfa3da0f4..29711c3cb 100644 --- a/cypress/integration/edit/filter_restrict.feature +++ b/cypress/integration/edit/filter_restrict.feature @@ -52,7 +52,7 @@ Feature: Editing Filter Restrictions And I add Facility Ownership to selected filters And I click Confirm And I click Exit without saving - And I confirm I want to discard changes + # And I confirm I want to discard changes Then the dashboard displays in view mode When I choose to edit dashboard And I click on Filter settings From 420493af8cb9ead4e6b5574bc436e1d2d90f605e Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Thu, 2 Sep 2021 14:29:43 +0200 Subject: [PATCH 4/4] fix: a few more tests needing to be disabled --- .../integration/edit/edit_dashboard.feature | 18 +++++++++--------- cypress/integration/view/offline.feature | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/integration/edit/edit_dashboard.feature b/cypress/integration/edit/edit_dashboard.feature index fe9d2de88..bc83e3a39 100644 --- a/cypress/integration/edit/edit_dashboard.feature +++ b/cypress/integration/edit/edit_dashboard.feature @@ -17,14 +17,14 @@ Feature: Creating, editing and deleting dashboard And I click Exit without saving Then the dashboard displays in view mode - @mutating - Scenario: I cancel exit without saving when name changed - Given I open existing dashboard - When I choose to edit dashboard - And dashboard title is added - And I click Exit without saving - # And I decide to continue editing - Then the dashboard displays in edit mode + # @mutating + # Scenario: I cancel exit without saving when name changed + # Given I open existing dashboard + # When I choose to edit dashboard + # And dashboard title is added + # And I click Exit without saving + # And I decide to continue editing + # Then the dashboard displays in edit mode # @mutating # Scenario: I cancel exit without saving when item added @@ -42,7 +42,7 @@ Feature: Creating, editing and deleting dashboard When I choose to edit dashboard And dashboard title is added And I click Exit without saving - # And I confirm I want to discard changes + # And I confirm I want to discard changes Then the dashboard displays in view mode @mutating diff --git a/cypress/integration/view/offline.feature b/cypress/integration/view/offline.feature index 813afb406..3aac996ec 100644 --- a/cypress/integration/view/offline.feature +++ b/cypress/integration/view/offline.feature @@ -52,11 +52,11 @@ Feature: Offline dashboard When I click Exit without saving Then the cached dashboard is loaded and displayed in view mode - Scenario: The sharing dialog is open when connectivity is lost - Given I open a cached dashboard - When I open sharing settings - And connectivity is turned off - Then it is not possible to change sharing settings + # Scenario: The sharing dialog is open when connectivity is lost + # Given I open a cached dashboard + # When I open sharing settings + # 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