Skip to content

Commit c463cb7

Browse files
feat: add utility to check if component properties are visible in the UI
1 parent b08baba commit c463cb7

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

e2e/helpers/properties.helpers.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page } from '@playwright/test';
1+
import { Page, expect } from '@playwright/test';
22
import { getByShapeType } from './konva-testing.helpers';
33
import { Group } from 'konva/lib/Group';
44

@@ -9,3 +9,13 @@ export const getShapeBackgroundColor = async (
99
const shape = (await getByShapeType(page, shapeType)) as Group;
1010
return shape?.children?.[0]?.attrs?.fill;
1111
};
12+
13+
export const checkPropertiesExist = async (
14+
page: Page,
15+
properties: string[]
16+
) => {
17+
for (const property of properties) {
18+
const propLocator = page.getByText(property, { exact: true });
19+
await expect(propLocator).toBeVisible();
20+
}
21+
};

0 commit comments

Comments
 (0)