sforkowany z mirror/soapbox
Fix ReportModal test
rodzic
fd542d1796
commit
b98073ee8f
|
@ -4,7 +4,7 @@ import React from 'react';
|
||||||
|
|
||||||
import { __stub } from 'soapbox/api';
|
import { __stub } from 'soapbox/api';
|
||||||
|
|
||||||
import { render, screen } from '../../../../../../jest/test-helpers';
|
import { render, screen, waitFor } from '../../../../../../jest/test-helpers';
|
||||||
import { normalizeAccount, normalizeStatus } from '../../../../../../normalizers';
|
import { normalizeAccount, normalizeStatus } from '../../../../../../normalizers';
|
||||||
import ReportModal from '../report-modal';
|
import ReportModal from '../report-modal';
|
||||||
|
|
||||||
|
@ -64,6 +64,9 @@ describe('<ReportModal />', () => {
|
||||||
await user.click(screen.getByTestId('rule-1'));
|
await user.click(screen.getByTestId('rule-1'));
|
||||||
await user.click(screen.getByText(/Next/));
|
await user.click(screen.getByText(/Next/));
|
||||||
await user.click(screen.getByText(/Submit/));
|
await user.click(screen.getByText(/Submit/));
|
||||||
|
|
||||||
|
await waitFor(() => {
|
||||||
expect(screen.getByText(/Thanks for submitting your report/)).toBeInTheDocument();
|
expect(screen.getByText(/Thanks for submitting your report/)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue