diff --git a/package.json b/package.json
index a0c24bf3fc..eb5159f7ab 100644
--- a/package.json
+++ b/package.json
@@ -36,13 +36,11 @@
"@dhis2/cypress-plugins": "^10.0.1",
"@reportportal/agent-js-cypress": "^5.1.3",
"@reportportal/agent-js-jest": "^5.0.6",
- "@testing-library/jest-dom": "5.16.5",
- "@testing-library/react": "12.1.5",
- "@testing-library/react-hooks": "7.0.2",
- "@testing-library/user-event": "13.5.0",
+ "@testing-library/jest-dom": "^6.5.0",
+ "@testing-library/react": "^16.0.1",
+ "@testing-library/user-event": "^14.5.2",
"cypress": "^12.8.1",
- "enzyme": "3.11.0",
- "enzyme-adapter-react-16": "1.15.7",
+ "enzyme": "^3.11.0",
"eslint-plugin-cypress": "2.12.1",
"fake-indexeddb": "4.0.1",
"jest-extended": "^4.0.2",
@@ -51,7 +49,7 @@
"dependencies": {
"@dhis2/app-runtime": "^3.10.2",
"@dhis2/multi-calendar-dates": "^1.1.0",
- "@dhis2/ui": "^9.2.0",
+ "@dhis2/ui": "^9.11.4",
"@dhis2/ui-forms": "7.16.3",
"@tanstack/react-query": "4.24.10",
"@tanstack/react-query-devtools": "4.24.14",
@@ -82,7 +80,7 @@
},
"resolutions": {
"@dhis2/multi-calendar-dates": "^1.1.0",
- "@dhis2/ui": "^9.2.0",
+ "@dhis2/ui": "^9.11.4",
"@dhis2/app-runtime": "^3.10.2"
}
}
diff --git a/src/app/app-wrapper.js b/src/app/app-wrapper.js
index eb0995bcb7..4e9db1392d 100644
--- a/src/app/app-wrapper.js
+++ b/src/app/app-wrapper.js
@@ -31,7 +31,7 @@ const enableRQDevtools = process.env.REACT_APP_ENABLE_RQ_DEVTOOLS === 'true'
export function OuterComponents({
children,
// This way we can use a different router in tests when needed
- router: Router,
+ router: Router = HashRouter,
queryClient: customQueryClient,
}) {
const queryClient = useQueryClient()
@@ -60,10 +60,6 @@ export function OuterComponents({
)
}
-OuterComponents.defaultProps = {
- router: HashRouter,
-}
-
OuterComponents.propTypes = {
children: PropTypes.any.isRequired,
queryClient: PropTypes.instanceOf(QueryClient).isRequired,
diff --git a/src/bottom-bar/validation-results-sidebar/validation-results-sidebar.test.js b/src/bottom-bar/validation-results-sidebar/validation-results-sidebar.test.js
index 5f9760a020..b21790c5a7 100644
--- a/src/bottom-bar/validation-results-sidebar/validation-results-sidebar.test.js
+++ b/src/bottom-bar/validation-results-sidebar/validation-results-sidebar.test.js
@@ -7,6 +7,7 @@ import React from 'react'
import { MemoryRouter } from 'react-router-dom'
import { render } from '../../test-utils/render.js'
import ValidationResultsSidebar from './validation-results-sidebar.js'
+import userEvent from '@testing-library/user-event'
describe('ValidationResultsSidebar', () => {
const hide = jest.fn()
@@ -218,11 +219,10 @@ describe('ValidationResultsSidebar', () => {
getByText('There was a problem running validation')
).toBeDefined()
- fireEvent.click(getByText('Run validation again'))
+ await userEvent.click(getByText('Run validation again'))
- await findByText('Running validation...')
+ await findByText('2 medium priority alerts')
expect(queryByText('There was a problem running validation')).toBeNull()
- expect(getByText('2 medium priority alerts')).toBeDefined()
})
it('should show empty data', async () => {
const overrideOptions = {
diff --git a/src/context-selection/menu-select/menu-select.js b/src/context-selection/menu-select/menu-select.js
index a7c023dd68..eb7f1c4616 100644
--- a/src/context-selection/menu-select/menu-select.js
+++ b/src/context-selection/menu-select/menu-select.js
@@ -3,7 +3,12 @@ import PropTypes from 'prop-types'
import React from 'react'
import css from './menu-select.module.css'
-export default function MenuSelect({ values, selected, dataTest, onChange }) {
+export default function MenuSelect({
+ values,
+ selected,
+ dataTest = 'menu-select',
+ onChange,
+}) {
return (