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
}
}
```
24 lines
492 B
TypeScript
24 lines
492 B
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
import { expect } from '@playwright/test'
|
|
|
|
export async function getRowByCellValueAndAssert({
|
|
page,
|
|
textToMatch,
|
|
cellClass,
|
|
}: {
|
|
cellClass: `.cell-${string}`
|
|
page: Page
|
|
textToMatch: string
|
|
}): Promise<Locator> {
|
|
const row = page
|
|
.locator(`.collection-list .table tr`)
|
|
.filter({
|
|
has: page.locator(`${cellClass}`, { hasText: textToMatch }),
|
|
})
|
|
.first()
|
|
|
|
await expect(row).toBeVisible()
|
|
return row
|
|
}
|