test(admin): ignores search params when waiting for list view url

This commit is contained in:
Jacob Fletcher
2024-04-04 14:53:59 -04:00
parent 36a22f2b3c
commit 03abc641c5
2 changed files with 3 additions and 2 deletions

View File

@@ -676,7 +676,7 @@ describe('admin', () => {
// delete all posts created by the seed
await deleteAllPosts()
await page.goto(postsUrl.list)
await page.waitForURL(postsUrl.list)
await page.waitForURL((url) => url.toString().startsWith(postsUrl.list))
await expect(page.locator(tableRowLocator)).toBeHidden()
await createPost({ title: 'post1' })
@@ -692,6 +692,7 @@ describe('admin', () => {
// prefill search with "a" from the query param
await page.goto(`${postsUrl.list}?search=dennis`)
await page.waitForURL(`${postsUrl.list}?search=dennis`)
// input should be filled out, list should filter
await expect(page.locator('.search-filter__input')).toHaveValue('dennis')