-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathmulti-select-no-common-props.spec.ts
More file actions
45 lines (37 loc) · 1.2 KB
/
multi-select-no-common-props.spec.ts
File metadata and controls
45 lines (37 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { test, expect } from '@playwright/test';
import {
addComponentsWithDifferentCategoriesToCanvas,
checkPropertiesDoNotExist,
checkPropertiesExist,
ComponentWithCategory,
getTransformer,
selectAllComponentsInCanvas,
} from '../helpers';
test('when selecting button and bar chart, check that there are not common props (just default layering prop)', async ({
page,
}) => {
page.goto('');
// Add components to canvas
const components: ComponentWithCategory[] = [
{ name: 'Button' },
{ name: 'Bar Chart', category: 'Rich Components' },
];
await addComponentsWithDifferentCategoriesToCanvas(page, components);
// Select all components in canvas
await selectAllComponentsInCanvas(page);
// Confirm both items are selected
const selectedItems = await getTransformer(page);
expect(selectedItems._nodes.length).toEqual(2);
const buttonProps: string[] = [
'Stroke',
'Stroke style',
'Background',
'TextColor',
'Disabled',
'Border-radius',
];
// Verify button props are not visible in the properties panel
await checkPropertiesDoNotExist(page, buttonProps);
// Verify layering prop to be visible
await checkPropertiesExist(page, ['Layering']);
});