chore: stabalize live preview test suite

This commit is contained in:
Jarrod Flesch
2024-11-11 16:24:45 -05:00
parent c96fa613bc
commit 71db10d68f
10 changed files with 32 additions and 22 deletions

View File

@@ -3,7 +3,8 @@ import type { AdminUrlUtil } from 'helpers/adminUrlUtil.js'
export const navigateToDoc = async (page: Page, urlUtil: AdminUrlUtil) => {
await page.goto(urlUtil.list)
await page.waitForURL(urlUtil.list)
const regex = new RegExp(`^${urlUtil.list}(?:\\?.*)?$`)
await page.waitForURL(regex)
const cellLink = page.locator(`tbody tr:first-child td a`).first()
const linkURL = await cellLink.getAttribute('href')
await page.goto(`${urlUtil.serverURL}${linkURL}`)