kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Fix tests
rodzic
866c80d30b
commit
5ff9c1c6ec
|
@ -81,6 +81,7 @@ describe('initAccountNoteModal()', () => {
|
|||
}) as Account;
|
||||
const expectedActions = [
|
||||
{ type: 'ACCOUNT_NOTE_INIT_MODAL', account, comment: 'hello' },
|
||||
{ type: 'MODAL_CLOSE', modalType: 'ACCOUNT_NOTE' },
|
||||
{ type: 'MODAL_OPEN', modalType: 'ACCOUNT_NOTE' },
|
||||
];
|
||||
await store.dispatch(initAccountNoteModal(account));
|
||||
|
|
|
@ -123,6 +123,7 @@ describe('deleteStatus()', () => {
|
|||
withRedraft: true,
|
||||
id: 'compose-modal',
|
||||
},
|
||||
{ type: 'MODAL_CLOSE', modalType: 'COMPOSE', modalProps: undefined },
|
||||
{ type: 'MODAL_OPEN', modalType: 'COMPOSE', modalProps: undefined },
|
||||
];
|
||||
await store.dispatch(deleteStatus(statusId, true));
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Provider } from 'react-redux';
|
|||
import '@testing-library/jest-dom';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
|
||||
import { MODAL_OPEN } from 'soapbox/actions/modals';
|
||||
import { MODAL_CLOSE, MODAL_OPEN } from 'soapbox/actions/modals';
|
||||
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
||||
|
||||
import ComposeButton from '../compose-button';
|
||||
|
@ -35,6 +35,7 @@ describe('<ComposeButton />', () => {
|
|||
|
||||
expect(store.getActions().length).toEqual(0);
|
||||
fireEvent.click(screen.getByRole('button'));
|
||||
expect(store.getActions()[0].type).toEqual(MODAL_OPEN);
|
||||
expect(store.getActions()[0].type).toEqual(MODAL_CLOSE);
|
||||
expect(store.getActions()[1].type).toEqual(MODAL_OPEN);
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue