Skip to content

Commit

Permalink
chore: fix tests after ui update
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Sep 4, 2024
1 parent 643555b commit 00c7998
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/Filters/Filters.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ describe('<Filters>', () => {
}
const wrapper = mount(<Filters {...props} />)
const title = wrapper.find({
'data-test': 'dhis2-uicore-noticebox-title',
'data-test': 'dhis2-uicore-noticebox-content-title',
})
const message = wrapper.find({
'data-test': 'dhis2-uicore-noticebox-message',
'data-test': 'dhis2-uicore-noticebox-content-message',
})

expect(title.text()).toMatchInlineSnapshot(`"Unrecognized category"`)
Expand Down
8 changes: 4 additions & 4 deletions src/components/Queries/DataStatisticsQuery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ describe('<DataStatisticsQuery>', () => {

it('displays errors it encounters', async () => {
const titleSelector = {
'data-test': 'dhis2-uicore-noticebox-title',
'data-test': 'dhis2-uicore-noticebox-content-title',
}
const messageSelector = {
'data-test': 'dhis2-uicore-noticebox-message',
'data-test': 'dhis2-uicore-noticebox-content-message',
}
const data = {
dataStatistics: () => {
Expand Down Expand Up @@ -174,10 +174,10 @@ describe('<DataStatisticsQuery>', () => {

it('renders a fallback message for errors', async () => {
const titleSelector = {
'data-test': 'dhis2-uicore-noticebox-title',
'data-test': 'dhis2-uicore-noticebox-content-title',
}
const messageSelector = {
'data-test': 'dhis2-uicore-noticebox-message',
'data-test': 'dhis2-uicore-noticebox-content-message',
}
const data = {
dataStatistics: () => {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Queries/TopFavoritesQuery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ describe('<TopFavoritesQuery>', () => {
describe('errors', () => {
it('displays errors it encounters', async () => {
const titleSelector = {
'data-test': 'dhis2-uicore-noticebox-title',
'data-test': 'dhis2-uicore-noticebox-content-title',
}
const messageSelector = {
'data-test': 'dhis2-uicore-noticebox-message',
'data-test': 'dhis2-uicore-noticebox-content-message',
}
const data = {
'dataStatistics/favorites': () => {
Expand Down Expand Up @@ -84,10 +84,10 @@ describe('<TopFavoritesQuery>', () => {

it('renders a fallback message for errors', async () => {
const titleSelector = {
'data-test': 'dhis2-uicore-noticebox-title',
'data-test': 'dhis2-uicore-noticebox-content-title',
}
const messageSelector = {
'data-test': 'dhis2-uicore-noticebox-message',
'data-test': 'dhis2-uicore-noticebox-content-message',
}
const data = {
'dataStatistics/favorites': () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Visualization/Visualization.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ describe('<Visualization>', () => {
}
const wrapper = mount(<Visualization {...props} />)
const title = wrapper.find({
'data-test': 'dhis2-uicore-noticebox-title',
'data-test': 'dhis2-uicore-noticebox-content-title',
})
const message = wrapper.find({
'data-test': 'dhis2-uicore-noticebox-message',
'data-test': 'dhis2-uicore-noticebox-content-message',
})

expect(title.text()).toMatchInlineSnapshot(`"Unrecognized category"`)
Expand Down

0 comments on commit 00c7998

Please sign in to comment.