Skip to content

Commit

Permalink
ADM-928:[frontend]test: fix jsdom test
Browse files Browse the repository at this point in the history
  • Loading branch information
weiraneve committed May 7, 2024
1 parent 2eb03c0 commit 530c80c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { backStep, nextStep, updateFailedTimeRange } from '@src/context/stepper/StepperSlice';
import { nextStep, updateFailedTimeRange } from '@src/context/stepper/StepperSlice';
import DateRangeViewer from '@src/components/Common/DateRangeViewer';
import { DateRange } from '@src/context/config/configSlice';
import { setupStore } from '@test/utils/setupStoreUtil';
Expand Down Expand Up @@ -71,7 +71,6 @@ describe('DateRangeViewer', () => {
});

it('should not show priority high icon when click expand button and step number is 0', async () => {
store.dispatch(backStep());
const { getByLabelText } = setup(mockDateRanges);
await userEvent.click(getByLabelText('expandMore'));
expect(screen.queryByTestId('PriorityHighIcon')).not.toBeInTheDocument();
Expand Down
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"lint": "eslint -c .eslintrc.json ./ && prettier --check ./",
"fix": "eslint -c .eslintrc.json --fix && npx prettier --write . --ignore-unknown",
"audit": "npx audit-ci@^6 --config ./audit-ci.jsonc",
"test": "jest",
"test:watch": "jest --watchAll",
"test": "jest --env=jsdom",
"test:watch": "jest --env=jsdom --watchAll",
"coverage": "jest --env=jsdom --watchAll=false --coverage",
"coverage:silent": "jest --env=jsdom --watchAll=false --coverage --silent",
"pre-e2e": "./scripts/generate-config-files.sh",
Expand Down

0 comments on commit 530c80c

Please sign in to comment.