environments/review-media-view-c8pef8/deployments/3427
Chewbacca 2023-05-31 08:54:54 -04:00
rodzic 866c80d30b
commit 5ff9c1c6ec
3 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -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));

Wyświetl plik

@ -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));

Wyświetl plik

@ -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);
});
});