Merge branch 'fix-toast-test' into 'develop'

Fix toast test

See merge request soapbox-pub/soapbox!2153
revert-polyfills
Alex Gleason 2023-01-11 19:25:30 +00:00
commit 7607daf371
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -75,9 +75,12 @@ describe('<Registration />', () => {
fireEvent.submit(screen.getByTestId('button'), { preventDefault: () => {} }); fireEvent.submit(screen.getByTestId('button'), { preventDefault: () => {} });
}); });
await waitFor(() => {
expect(screen.getByTestId('toast')).toHaveTextContent(/this username is unavailable/i); expect(screen.getByTestId('toast')).toHaveTextContent(/this username is unavailable/i);
}); });
});
it('handles generic errors', async() => { it('handles generic errors', async() => {
__stub(mock => { __stub(mock => {
mock.onPost('/api/v1/pepe/accounts').reply(500, {}); mock.onPost('/api/v1/pepe/accounts').reply(500, {});