@@ -6,11 +6,9 @@ import {
66 fireEvent ,
77 waitFor
88} from '../../../test-utils' ;
9- import { setToastText , showToast } from '../actions/toast' ;
9+ import { showToast } from '../actions/toast' ;
1010import Toast from './Toast' ;
1111
12- // TODO: update action calls after reducer refactor is merged.
13-
1412describe ( `Toast` , ( ) => {
1513 it ( 'is hidden by default' , ( ) => {
1614 reduxRender ( < Toast /> ) ;
@@ -20,8 +18,7 @@ describe(`Toast`, () => {
2018 it ( 'opens when an action is dispatched' , async ( ) => {
2119 const { store } = reduxRender ( < Toast /> ) ;
2220 act ( ( ) => {
23- store . dispatch ( showToast ( 1500 ) ) ;
24- store . dispatch ( setToastText ( 'Toast.SketchSaved' ) ) ;
21+ store . dispatch ( showToast ( 'Toast.SketchSaved' ) ) ;
2522 } ) ;
2623
2724 const toast = screen . queryByRole ( 'status' ) ;
@@ -32,8 +29,7 @@ describe(`Toast`, () => {
3229 it ( 'closes automatically after time' , async ( ) => {
3330 const { store } = reduxRender ( < Toast /> ) ;
3431 act ( ( ) => {
35- store . dispatch ( showToast ( 100 ) ) ;
36- store . dispatch ( setToastText ( 'Toast.SketchSaved' ) ) ;
32+ store . dispatch ( showToast ( 'Toast.SketchSaved' , 100 ) ) ;
3733 } ) ;
3834
3935 expect ( screen . queryByRole ( 'status' ) ) . toBeInTheDocument ( ) ;
0 commit comments