Files
payloadcms/test/helpers/e2e/goToListDoc.ts
Jarrod Flesch dc732b8f52 fix(ui): populate nested fields for enableListViewSelectAPI (#13827)
Fixes an issue with the new experimental `enableListViewSelectAPI`
config option.

Group fields were not populating properly in the list view

### Before (incorrect)
```ts
{
  group.field: true
}
```

### After (correct)
```ts
{
  group: {
    field: true
  }
}
```
2025-09-16 21:23:08 +00:00

25 lines
687 B
TypeScript

import type { Page } from '@playwright/test'
import type { AdminUrlUtil } from '../../helpers/adminUrlUtil.js'
import { getRowByCellValueAndAssert } from './getRowByCellValueAndAssert.js'
export async function goToListDoc({
page,
cellClass,
textToMatch,
urlUtil,
}: {
cellClass: `.cell-${string}`
page: Page
textToMatch: string
urlUtil: AdminUrlUtil
}) {
await page.goto(urlUtil.list)
const row = await getRowByCellValueAndAssert({ page, textToMatch, cellClass })
const cellLink = row.locator(`td a`).first()
const linkURL = await cellLink.getAttribute('href')
await page.goto(`${urlUtil.serverURL}${linkURL}`)
await page.waitForLoadState('networkidle')
}