@@ -6,11 +6,9 @@ import {
6
6
fireEvent ,
7
7
waitFor
8
8
} from '../../../test-utils' ;
9
- import { setToastText , showToast } from '../actions/toast' ;
9
+ import { showToast } from '../actions/toast' ;
10
10
import Toast from './Toast' ;
11
11
12
- // TODO: update action calls after reducer refactor is merged.
13
-
14
12
describe ( `Toast` , ( ) => {
15
13
it ( 'is hidden by default' , ( ) => {
16
14
reduxRender ( < Toast /> ) ;
@@ -20,8 +18,7 @@ describe(`Toast`, () => {
20
18
it ( 'opens when an action is dispatched' , async ( ) => {
21
19
const { store } = reduxRender ( < Toast /> ) ;
22
20
act ( ( ) => {
23
- store . dispatch ( showToast ( 1500 ) ) ;
24
- store . dispatch ( setToastText ( 'Toast.SketchSaved' ) ) ;
21
+ store . dispatch ( showToast ( 'Toast.SketchSaved' ) ) ;
25
22
} ) ;
26
23
27
24
const toast = screen . queryByRole ( 'status' ) ;
@@ -32,8 +29,7 @@ describe(`Toast`, () => {
32
29
it ( 'closes automatically after time' , async ( ) => {
33
30
const { store } = reduxRender ( < Toast /> ) ;
34
31
act ( ( ) => {
35
- store . dispatch ( showToast ( 100 ) ) ;
36
- store . dispatch ( setToastText ( 'Toast.SketchSaved' ) ) ;
32
+ store . dispatch ( showToast ( 'Toast.SketchSaved' , 100 ) ) ;
37
33
} ) ;
38
34
39
35
expect ( screen . queryByRole ( 'status' ) ) . toBeInTheDocument ( ) ;
0 commit comments