- 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
20 lines
687 B
TypeScript
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))}]`
|
|
)
|
|
}
|