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:
Maurice
2026-11-07 23:59:38 +01:00
parent a7cc1b9e57
commit 27aab5c783
@@ -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 () => {