When selecting query presets from the list drawer, all query presets are available for selection, even if unrelated to the underlying collection. When selecting one of these presets, the list view will crash with client-side exceptions because the columns and filters that are applied are incompatible. The fix is to the thread `filterOptions` through the query presets drawer. This will ensure that only related collections are shown.
12 lines
436 B
TypeScript
12 lines
436 B
TypeScript
import type { Locator, Page } from '@playwright/test'
|
|
|
|
import { expect } from '@playwright/test'
|
|
|
|
export async function openQueryPresetDrawer({ page }: { page: Page }): Promise<Locator> {
|
|
await page.click('button#select-preset')
|
|
const drawer = page.locator('dialog[id^="list-drawer_0_"]')
|
|
await expect(drawer).toBeVisible()
|
|
await expect(drawer.locator('.collection-list--payload-query-presets')).toBeVisible()
|
|
return drawer
|
|
}
|