File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 2
2
// SPDX-FileCopyrightText: TNG Technology Consulting GmbH <https://www.tngtech.com>
3
3
//
4
4
// SPDX-License-Identifier: Apache-2.0
5
- import { screen } from '@testing-library/react' ;
5
+ import { act , screen } from '@testing-library/react' ;
6
6
7
7
import { text } from '../../../../shared/text' ;
8
8
import { faker } from '../../../../testing/Faker' ;
@@ -32,7 +32,7 @@ describe('ProcessPopup', () => {
32
32
33
33
const popup = < ProcessPopup /> ;
34
34
35
- const { store, rerender } = renderComponent ( popup , {
35
+ const { store } = renderComponent ( popup , {
36
36
actions : [
37
37
setLoading ( true ) ,
38
38
writeLogMessage ( {
@@ -43,10 +43,8 @@ describe('ProcessPopup', () => {
43
43
] ,
44
44
} ) ;
45
45
46
- store . dispatch ( setLoading ( false ) ) ;
47
- rerender ( popup ) ;
48
- store . dispatch ( setLoading ( true ) ) ;
49
- rerender ( popup ) ;
46
+ act ( ( ) => void store . dispatch ( setLoading ( false ) ) ) ;
47
+ act ( ( ) => void store . dispatch ( setLoading ( true ) ) ) ;
50
48
51
49
expect ( screen . queryByText ( message ) ) . not . toBeInTheDocument ( ) ;
52
50
} ) ;
You can’t perform that action at this time.
0 commit comments