Skip to content

Commit

Permalink
test: update jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Mar 5, 2024
1 parent 5596c30 commit 4743b45
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 10 deletions.
10 changes: 5 additions & 5 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-02-29T16:49:15.985Z\n"
"PO-Revision-Date: 2024-02-29T16:49:15.985Z\n"
"POT-Creation-Date: 2024-03-05T14:54:55.437Z\n"
"PO-Revision-Date: 2024-03-05T14:54:55.437Z\n"

msgid "Something went wrong"
msgstr "Something went wrong"
Expand Down Expand Up @@ -72,15 +72,15 @@ msgstr "Select checks to run."
msgid "Report type"
msgstr "Report type"

msgid "No options available"
msgstr "No options available"

msgid "Loading options"
msgstr "Loading options"

msgid "Something went wrong whilst loading options"
msgstr "Something went wrong whilst loading options"

msgid "No options available"
msgstr "No options available"

msgid "Delay"
msgstr "Delay"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SkipTableTypesField from './SkipTableTypesField'

const { Form } = ReactFinalForm

jest.mock('../../hooks/parameter-options', () => ({
jest.mock('../../../hooks/parameter-options', () => ({
useParameterOption: jest.fn(),
}))

Expand Down
2 changes: 1 addition & 1 deletion src/components/FormFields/LabeledOptionsField.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('<LabeledOptionsField>', () => {

const actual = wrapper
.find({
'data-test': 'dhis2-uiwidgets-multiselectfield-help',
'data-test': 'dhis2-uiwidgets-singleselectfield-help',
})
.text()

Expand Down
2 changes: 1 addition & 1 deletion src/components/FormFields/QueueOrderField.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QueueOrderField from './QueueOrderField'

const { Form } = ReactFinalForm

jest.mock('../../../hooks/queueables', () => ({
jest.mock('../../hooks/queueables', () => ({
useQueueables: jest.fn(),
}))

Expand Down
2 changes: 1 addition & 1 deletion src/components/Forms/QueueAddForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QueueAddForm from './QueueAddForm'
const { Form } = ReactFinalForm

// Mock components that make network requests
jest.mock('../FormFields/QueueOrderField/QueueOrderField', () => () => (
jest.mock('../FormFields/QueueOrderField', () => () => (
<div data-test="sequence-order-field">QueueOrderField</div>
))

Expand Down
2 changes: 1 addition & 1 deletion src/components/Forms/QueueEditForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QueueEditForm from './QueueEditForm'
const { Form } = ReactFinalForm

// Mock components that make network requests
jest.mock('../FormFields/QueueOrderField/QueueOrderField', () => () => (
jest.mock('../FormFields/QueueOrderField', () => () => (
<div data-test="sequence-order-field">QueueOrderField</div>
))

Expand Down
2 changes: 2 additions & 0 deletions src/hooks/parameter-options/use-parameter-option.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describe('useParameterOption', () => {
predictors: { predictors: 'predictors' },
predictorGroups: { predictorGroups: 'predictorGroups' },
dataIntegrity: 'dataIntegrityChecks',
dashboards: { dashboards: 'dashboard' },
userGroups: { userGroups: 'receivers' },
}
const wrapper = ({ children }) => (
<CustomDataProvider data={data}>{children}</CustomDataProvider>
Expand Down
6 changes: 6 additions & 0 deletions src/hooks/parameter-options/use-parameter-options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ describe('useParameterOptions', () => {
predictors: { predictors: 'predictors' },
predictorGroups: { predictorGroups: 'predictorGroups' },
dataIntegrity: 'dataIntegrityChecks',
dashboards: { dashboards: 'dashboard' },
userGroups: { userGroups: 'receivers' },
}
const wrapper = ({ children }) => (
<CustomDataProvider data={data}>{children}</CustomDataProvider>
Expand All @@ -34,6 +36,8 @@ describe('useParameterOptions', () => {
predictors: 'predictors',
predictorGroups: 'predictorGroups',
dataIntegrityChecks: 'dataIntegrityChecks',
dashboard: 'dashboard',
receivers: 'receivers',
},
})
})
Expand All @@ -47,6 +51,8 @@ describe('useParameterOptions', () => {
predictors: { predictors: 'predictors' },
predictorGroups: { predictorGroups: 'predictorGroups' },
dataIntegrity: 'dataIntegrityChecks',
dashboards: { dashboards: 'dashboard' },
userGroups: { userGroups: 'receivers' },
}
const wrapper = ({ children }) => (
<CustomDataProvider data={data}>{children}</CustomDataProvider>
Expand Down

0 comments on commit 4743b45

Please sign in to comment.