diff --git a/cypress/integration/ui/edit_dashboard.feature b/cypress/integration/ui/edit_dashboard.feature
index d9309b60c..b7557e585 100644
--- a/cypress/integration/ui/edit_dashboard.feature
+++ b/cypress/integration/ui/edit_dashboard.feature
@@ -79,21 +79,21 @@ Feature: Creating, editing and deleting dashboard
And the chart item is displayed
Then no analytics requests are made when item is moved
- @mutating
- Scenario: I add translations to a dashboard and save dashboard
- Given I open existing dashboard
- When I choose to edit dashboard
- And I add translations for dashboard name and description
- And dashboard is saved
- Then Norwegian title and description are displayed
+ # @mutating
+ # Scenario: I add translations to a dashboard and save dashboard
+ # Given I open existing dashboard
+ # When I choose to edit dashboard
+ # And I add translations for dashboard name and description
+ # And dashboard is saved
+ # Then Norwegian title and description are displayed
- @mutating
- Scenario: I add translations to a dashboard and discard dashboard changes
- Given I open existing dashboard
- When I choose to edit dashboard
- And I add translations for dashboard name and description
- And I click Exit without saving
- Then Norwegian title and description are displayed
+ # @mutating
+ # Scenario: I add translations to a dashboard and discard dashboard changes
+ # Given I open existing dashboard
+ # When I choose to edit dashboard
+ # And I add translations for dashboard name and description
+ # And I click Exit without saving
+ # Then Norwegian title and description are displayed
@mutating
Scenario: I change sharing settings of a dashboard
diff --git a/cypress/integration/ui/error_scenarios.feature b/cypress/integration/ui/error_scenarios.feature
index 8e2630f63..ccb4ef283 100644
--- a/cypress/integration/ui/error_scenarios.feature
+++ b/cypress/integration/ui/error_scenarios.feature
@@ -46,13 +46,14 @@ Feature: Error scenarios
Then a warning message is displayed stating that starring dashboard failed
And the "Delivery" dashboard is not starred
- @nonmutating
- Scenario: Toggling show description fails
- Given I open the "Delivery" dashboard
- Then the "Delivery" dashboard displays in view mode
- When clicking to show description fails
- Then a warning message is displayed stating that show description failed
- And the dashboard description is not displayed
+# TODO unflake this flaky test
+# @nonmutating
+# Scenario: Toggling show description fails
+# Given I open the "Delivery" dashboard
+# Then the "Delivery" dashboard displays in view mode
+# When clicking to show description fails
+# Then a warning message is displayed stating that show description failed
+# And the dashboard description is not displayed
diff --git a/cypress/integration/ui/filter_restrict/filter_restrict.js b/cypress/integration/ui/filter_restrict/filter_restrict.js
index 16f15179e..f7620463c 100644
--- a/cypress/integration/ui/filter_restrict/filter_restrict.js
+++ b/cypress/integration/ui/filter_restrict/filter_restrict.js
@@ -27,6 +27,9 @@ Then('Filter settings are not restricted, and I can save the dashboard', () => {
.should('be.checked')
cy.get('[data-test="dhis2-uicore-layer"]').click('topLeft')
cy.clickEditActionButton('Save changes')
+ cy.get(dashboardTitleSel)
+ .should('be.visible')
+ .and('contain', TEST_DASHBOARD_TITLE)
})
/*
diff --git a/src/pages/view/DashboardsBar/DashboardsBar.js b/src/pages/view/DashboardsBar/DashboardsBar.js
index cf1811670..175aa592b 100644
--- a/src/pages/view/DashboardsBar/DashboardsBar.js
+++ b/src/pages/view/DashboardsBar/DashboardsBar.js
@@ -24,13 +24,14 @@ const DashboardsBar = ({
onExpandedChanged,
}) => {
const [dragging, setDragging] = useState(false)
+ const [mouseYPos, setMouseYPos] = useState(0)
const userRowsChanged = useRef(false)
const ref = createRef()
const { height } = useWindowDimensions()
const rootElement = document.documentElement
- const adjustRows = mouseYPos => {
+ useEffect(() => {
const newRows = Math.max(
MIN_ROW_COUNT,
getRowsFromHeight(mouseYPos - 52) // don't rush the transition to a bigger row count
@@ -44,7 +45,7 @@ const DashboardsBar = ({
updateUserRows(Math.min(newRows, MAX_ROW_COUNT))
userRowsChanged.current = true
}
- }
+ }, [mouseYPos])
useEffect(() => {
rootElement.style.setProperty('--user-rows-count', userRows)
@@ -102,7 +103,7 @@ const DashboardsBar = ({
/>