openpencil/tests/helpers/properties.ts
Danila Poyarkov 5371ed11b8 feat(app): migrate paint effect and export panels
- Share compact item-row and paint-field anatomy across Fill, Stroke, Effects, and Export
- Add COLOR binding transactions with picker rollback and one-step undo
- Replace bespoke panel test hooks with semantic selectors and visual coverage
2026-07-14 17:06:28 +03:00

20 lines
687 B
TypeScript

import type { Locator, Page } from '@playwright/test'
export function propertySection(page: Page, name: string): Locator {
return page.getByRole('region', { name, exact: true })
}
export function propertyField(page: Page, property: string): Locator {
return page.locator(`[data-property=${JSON.stringify(property)}]`)
}
export function propertyItems(page: Page, property: string): Locator {
return page.locator(`[data-property=${JSON.stringify(property)}][data-index]`)
}
export function propertyItem(page: Page, property: string, index = 0): Locator {
return page.locator(
`[data-property=${JSON.stringify(property)}][data-index=${JSON.stringify(String(index))}]`
)
}