Skip to content

Commit b9e2e77

Browse files
committed
add introduce test retries for better handling of intermittent failures
1 parent 912fac9 commit b9e2e77

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

frontend/src/views/tests/taskAction.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ describe('Submitting Mapping Status for a Task', () => {
3131
return { user, router };
3232
};
3333

34+
jest.retryTimes(2);
3435
it('should stop mapping and direct to tasks selection page', async () => {
35-
act(() => {
36+
await act(() => {
3637
store.dispatch({ type: 'SET_LOCALE', locale: 'en-US' });
3738
store.dispatch({ type: 'SET_TOKEN', token: 'validToken' });
3839
store.dispatch({
@@ -62,7 +63,7 @@ describe('Submitting Mapping Status for a Task', () => {
6263
</QueryParamProvider>
6364
</QueryClientProviders>,
6465
);
65-
66+
6667
await waitFor(() =>
6768
expect(screen.getByRole('heading')).toHaveTextContent(
6869
'We found another mapping task already locked by you',

frontend/src/views/tests/teams.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ describe('Create Team', () => {
127127
});
128128

129129
describe('Edit Team', () => {
130+
jest.retryTimes(2);
130131
it('should display default details of the team before editing', async () => {
131132
await act(() => {
132133
store.dispatch({

0 commit comments

Comments
 (0)