mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
test(journey): wait for the dropped create parameter to reach the URL
The draft opens and the parameter goes in the same effect, but the URL shows it a render later. Under CI load the check ran in between and saw ?create=entry; it now waits for the empty search like it waits for the draft.
This commit is contained in:
@@ -162,7 +162,8 @@ describe('useJourneyDetail', () => {
|
||||
setup({ search: '?create=entry' });
|
||||
await waitFor(() => expect(latest.editingEntry).not.toBeNull());
|
||||
expect(latest.editingEntry).toMatchObject({ id: 0, journey_id: 7, type: 'entry', visibility: 'private' });
|
||||
expect(screen.getByTestId('search')).toHaveTextContent('');
|
||||
// The parameter goes in the same effect but reaches the URL a render later.
|
||||
await waitFor(() => expect(screen.getByTestId('search')).toBeEmptyDOMElement());
|
||||
});
|
||||
|
||||
it('FE-JRN-DETHOOK-004: a viewer never gets the draft editor', async () => {
|
||||
|
||||
Reference in New Issue
Block a user