Skip to content

Commit a932b20

Browse files
authored
chore: replace timeout with waiting for navigation (#26)
1 parent 130819d commit a932b20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/helpers/list-utilities.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export async function createList(
2323
await page.getByLabel('Name').fill(listName);
2424
await page.getByLabel('Description').fill(listDescription);
2525
await page.getByRole('button', { name: 'Continue' }).click();
26-
await page.waitForTimeout(1000);
26+
// wait until the list was created and we're on its add/remove movies page
27+
await page.waitForURL(url => url.searchParams.has('listId'));
2728
});
2829
}
2930

0 commit comments

Comments
 (0)