Skip to content

Commit d18d6fd

Browse files
committed
update showToast action syntax
1 parent ce0a04f commit d18d6fd

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

client/modules/IDE/components/Toast.test.jsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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';
1010
import Toast from './Toast';
1111

12-
// TODO: update action calls after reducer refactor is merged.
13-
1412
describe(`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

Comments
 (0)