vease 2.2.0-rc.1 → 2.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build/tests/e2e/utils/create_objects.js +2 -3
- package/.build/tests/e2e/utils/crs.js +4 -4
- package/.build/tests/e2e/utils/crs_flows.js +3 -3
- package/.build/tests/e2e/utils/data_manager.js +2 -2
- package/.build/tests/e2e/utils/extension.js +2 -2
- package/.build/tests/e2e/utils/fixtures.js +1 -1
- package/.build/tests/e2e/utils/load.js +1 -1
- package/.build/tests/e2e/utils/project_interaction.js +2 -2
- package/package.json +4 -1
- package/tests/e2e/utils/create_objects.ts +2 -2
- package/tests/e2e/utils/crs.ts +7 -4
- package/tests/e2e/utils/crs_flows.ts +3 -3
- package/tests/e2e/utils/data_manager.ts +2 -2
- package/tests/e2e/utils/extension.ts +2 -2
- package/tests/e2e/utils/fixtures.ts +1 -1
- package/tests/e2e/utils/load.ts +1 -1
- package/tests/e2e/utils/project_interaction.ts +2 -2
- package/.build/tests/e2e/utils/app_interaction.js +0 -24
- package/.build/tests/e2e/utils/basemap.js +0 -55
- package/.build/tests/e2e/utils/camera_filters.js +0 -105
- package/.build/tests/e2e/utils/camera_interaction.js +0 -107
- package/.build/tests/e2e/utils/camera_tools.js +0 -43
- package/.build/tests/e2e/utils/clipping_planes_interaction.js +0 -80
- package/.build/tests/e2e/utils/constants.js +0 -43
- package/.build/tests/e2e/utils/data/constants.js +0 -26
- package/.build/tests/e2e/utils/data/helpers/attribute.js +0 -85
- package/.build/tests/e2e/utils/data/helpers/attribute_colors.js +0 -47
- package/.build/tests/e2e/utils/data/helpers/attribute_menu.js +0 -13
- package/.build/tests/e2e/utils/data/helpers/color.js +0 -98
- package/.build/tests/e2e/utils/data/helpers/color_picker.js +0 -52
- package/.build/tests/e2e/utils/data/helpers/textures.js +0 -26
- package/.build/tests/e2e/utils/data/index.js +0 -28
- package/.build/tests/e2e/utils/data/mesh/cells/attribute.js +0 -43
- package/.build/tests/e2e/utils/data/mesh/cells/color.js +0 -26
- package/.build/tests/e2e/utils/data/mesh/cells/index.js +0 -4
- package/.build/tests/e2e/utils/data/mesh/cells/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/mesh/edges/attribute.js +0 -43
- package/.build/tests/e2e/utils/data/mesh/edges/color.js +0 -26
- package/.build/tests/e2e/utils/data/mesh/edges/index.js +0 -5
- package/.build/tests/e2e/utils/data/mesh/edges/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/mesh/edges/width.js +0 -9
- package/.build/tests/e2e/utils/data/mesh/index.js +0 -24
- package/.build/tests/e2e/utils/data/mesh/points/attribute.js +0 -31
- package/.build/tests/e2e/utils/data/mesh/points/color.js +0 -26
- package/.build/tests/e2e/utils/data/mesh/points/index.js +0 -5
- package/.build/tests/e2e/utils/data/mesh/points/size.js +0 -9
- package/.build/tests/e2e/utils/data/mesh/points/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/mesh/polygon/attribute.js +0 -47
- package/.build/tests/e2e/utils/data/mesh/polygon/color.js +0 -26
- package/.build/tests/e2e/utils/data/mesh/polygon/index.js +0 -5
- package/.build/tests/e2e/utils/data/mesh/polygon/textures.js +0 -14
- package/.build/tests/e2e/utils/data/mesh/polygon/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/mesh/polyhedra/attribute.js +0 -43
- package/.build/tests/e2e/utils/data/mesh/polyhedra/color.js +0 -29
- package/.build/tests/e2e/utils/data/mesh/polyhedra/index.js +0 -4
- package/.build/tests/e2e/utils/data/mesh/polyhedra/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/model/attribute.js +0 -99
- package/.build/tests/e2e/utils/data/model/color.js +0 -69
- package/.build/tests/e2e/utils/data/model/edges/components.js +0 -50
- package/.build/tests/e2e/utils/data/model/edges/index.js +0 -3
- package/.build/tests/e2e/utils/data/model/edges/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/model/index.js +0 -11
- package/.build/tests/e2e/utils/data/model/points/components.js +0 -50
- package/.build/tests/e2e/utils/data/model/points/index.js +0 -3
- package/.build/tests/e2e/utils/data/model/points/visibility.js +0 -9
- package/.build/tests/e2e/utils/data/model/style_menu.js +0 -10
- package/.build/tests/e2e/utils/data/model/surfaces/index.js +0 -2
- package/.build/tests/e2e/utils/data/model/surfaces/visibility.js +0 -8
- package/.build/tests/e2e/utils/model_tabs.js +0 -35
- package/.build/tests/e2e/utils/object_trees/common.js +0 -122
- package/.build/tests/e2e/utils/object_trees/main_object_tree.js +0 -86
- package/.build/tests/e2e/utils/object_trees/model_components_object_tree.js +0 -111
- package/.build/tests/e2e/utils/other.js +0 -13
- package/.build/tests/e2e/utils/viewer_canvas.js +0 -83
- package/.build/tests/e2e/utils/viewer_interaction.js +0 -87
- package/.build/tests/e2e/utils/viewer_menu.js +0 -98
- package/.build/tests/e2e/utils/wait_for_action_settled.js +0 -63
- package/tests/e2e/utils/app_interaction.ts +0 -35
- package/tests/e2e/utils/basemap.ts +0 -89
- package/tests/e2e/utils/camera_filters.ts +0 -176
- package/tests/e2e/utils/camera_interaction.ts +0 -179
- package/tests/e2e/utils/camera_tools.ts +0 -62
- package/tests/e2e/utils/clipping_planes_interaction.ts +0 -126
- package/tests/e2e/utils/constants.ts +0 -100
- package/tests/e2e/utils/data/constants.ts +0 -58
- package/tests/e2e/utils/data/helpers/attribute.ts +0 -156
- package/tests/e2e/utils/data/helpers/attribute_colors.ts +0 -83
- package/tests/e2e/utils/data/helpers/attribute_menu.ts +0 -19
- package/tests/e2e/utils/data/helpers/color.ts +0 -214
- package/tests/e2e/utils/data/helpers/color_picker.ts +0 -82
- package/tests/e2e/utils/data/helpers/textures.ts +0 -41
- package/tests/e2e/utils/data/index.ts +0 -2
- package/tests/e2e/utils/data/mesh/cells/attribute.ts +0 -103
- package/tests/e2e/utils/data/mesh/cells/color.ts +0 -52
- package/tests/e2e/utils/data/mesh/cells/index.ts +0 -3
- package/tests/e2e/utils/data/mesh/cells/visibility.ts +0 -9
- package/tests/e2e/utils/data/mesh/edges/attribute.ts +0 -103
- package/tests/e2e/utils/data/mesh/edges/color.ts +0 -52
- package/tests/e2e/utils/data/mesh/edges/index.ts +0 -4
- package/tests/e2e/utils/data/mesh/edges/visibility.ts +0 -9
- package/tests/e2e/utils/data/mesh/edges/width.ts +0 -9
- package/tests/e2e/utils/data/mesh/index.ts +0 -6
- package/tests/e2e/utils/data/mesh/points/attribute.ts +0 -66
- package/tests/e2e/utils/data/mesh/points/color.ts +0 -52
- package/tests/e2e/utils/data/mesh/points/index.ts +0 -4
- package/tests/e2e/utils/data/mesh/points/size.ts +0 -9
- package/tests/e2e/utils/data/mesh/points/visibility.ts +0 -9
- package/tests/e2e/utils/data/mesh/polygon/attribute.ts +0 -110
- package/tests/e2e/utils/data/mesh/polygon/color.ts +0 -52
- package/tests/e2e/utils/data/mesh/polygon/index.ts +0 -4
- package/tests/e2e/utils/data/mesh/polygon/textures.ts +0 -21
- package/tests/e2e/utils/data/mesh/polygon/visibility.ts +0 -9
- package/tests/e2e/utils/data/mesh/polyhedra/attribute.ts +0 -103
- package/tests/e2e/utils/data/mesh/polyhedra/color.ts +0 -58
- package/tests/e2e/utils/data/mesh/polyhedra/index.ts +0 -3
- package/tests/e2e/utils/data/mesh/polyhedra/visibility.ts +0 -9
- package/tests/e2e/utils/data/model/attribute.ts +0 -180
- package/tests/e2e/utils/data/model/color.ts +0 -110
- package/tests/e2e/utils/data/model/edges/components.ts +0 -97
- package/tests/e2e/utils/data/model/edges/index.ts +0 -2
- package/tests/e2e/utils/data/model/edges/visibility.ts +0 -9
- package/tests/e2e/utils/data/model/index.ts +0 -5
- package/tests/e2e/utils/data/model/points/components.ts +0 -97
- package/tests/e2e/utils/data/model/points/index.ts +0 -2
- package/tests/e2e/utils/data/model/points/visibility.ts +0 -9
- package/tests/e2e/utils/data/model/style_menu.ts +0 -11
- package/tests/e2e/utils/data/model/surfaces/index.ts +0 -1
- package/tests/e2e/utils/data/model/surfaces/visibility.ts +0 -8
- package/tests/e2e/utils/model_tabs.ts +0 -61
- package/tests/e2e/utils/object_trees/common.ts +0 -212
- package/tests/e2e/utils/object_trees/main_object_tree.ts +0 -167
- package/tests/e2e/utils/object_trees/model_components_object_tree.ts +0 -219
- package/tests/e2e/utils/other.ts +0 -15
- package/tests/e2e/utils/viewer_canvas.ts +0 -136
- package/tests/e2e/utils/viewer_interaction.ts +0 -96
- package/tests/e2e/utils/viewer_menu.ts +0 -205
- package/tests/e2e/utils/wait_for_action_settled.ts +0 -108
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import type { Locator, Page } from "@playwright/test";
|
|
2
|
-
import {
|
|
3
|
-
MAX_PERCENTAGE,
|
|
4
|
-
clickColorPickerCanvas,
|
|
5
|
-
clickColorPickerSlider,
|
|
6
|
-
clickCopyColorBtn,
|
|
7
|
-
pasteColorInputText,
|
|
8
|
-
setColorInputText,
|
|
9
|
-
} from "@vease_tests/utils/data/helpers/color_picker";
|
|
10
|
-
import { ensureFeatureVisible, ensureMenuOpen } from "@vease_tests/utils/viewer_interaction";
|
|
11
|
-
import { moveMouseOutOfTheWay } from "@vease_tests/utils/app_interaction";
|
|
12
|
-
import { waitForActionSettled } from "@vease_tests/utils/wait_for_action_settled";
|
|
13
|
-
|
|
14
|
-
async function setColoringStyle(
|
|
15
|
-
window: Page,
|
|
16
|
-
menuTestId: string,
|
|
17
|
-
coloringStyle: string,
|
|
18
|
-
container: Page | Locator = window,
|
|
19
|
-
): Promise<void> {
|
|
20
|
-
await ensureMenuOpen(window, menuTestId);
|
|
21
|
-
await ensureFeatureVisible(window, menuTestId);
|
|
22
|
-
|
|
23
|
-
await container.getByTestId("coloringStyleSelector").first().click();
|
|
24
|
-
await waitForActionSettled(window);
|
|
25
|
-
|
|
26
|
-
const listItem = window
|
|
27
|
-
.locator(".v-overlay-container")
|
|
28
|
-
.locator(".v-list-item")
|
|
29
|
-
.filter({ hasText: coloringStyle, visible: true })
|
|
30
|
-
.first();
|
|
31
|
-
await listItem.waitFor({ state: "visible", timeout: 15_000 });
|
|
32
|
-
await listItem.click();
|
|
33
|
-
await moveMouseOutOfTheWay(window);
|
|
34
|
-
await waitForActionSettled(window);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async function setColor(
|
|
38
|
-
window: Page,
|
|
39
|
-
menuTestId: string,
|
|
40
|
-
container: Page | Locator = window,
|
|
41
|
-
): Promise<void> {
|
|
42
|
-
await setColoringStyle(window, menuTestId, "Constant", container);
|
|
43
|
-
await clickColorPickerCanvas(window, container);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async function setColorWithSlider(
|
|
47
|
-
window: Page,
|
|
48
|
-
menuTestId: string,
|
|
49
|
-
container: Page | Locator = window,
|
|
50
|
-
): Promise<void> {
|
|
51
|
-
await setColoringStyle(window, menuTestId, "Constant", container);
|
|
52
|
-
await clickColorPickerSlider(window, container);
|
|
53
|
-
await clickColorPickerCanvas(window, container);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
async function setOpacity(window: Page, menuTestId: string, percent: number): Promise<void> {
|
|
57
|
-
await ensureMenuOpen(window, menuTestId);
|
|
58
|
-
await ensureFeatureVisible(window, menuTestId);
|
|
59
|
-
const menu = window.getByTestId(menuTestId);
|
|
60
|
-
const alphaSlider = menu
|
|
61
|
-
.getByTestId("colorPicker")
|
|
62
|
-
.locator(".v-color-picker-preview__alpha, .v-color-picker__alpha")
|
|
63
|
-
.first();
|
|
64
|
-
const box = await alphaSlider.boundingBox();
|
|
65
|
-
if (!box) {
|
|
66
|
-
throw new Error("Could not get bounding box of the opacity slider");
|
|
67
|
-
}
|
|
68
|
-
await alphaSlider.click({
|
|
69
|
-
force: true,
|
|
70
|
-
position: { x: (box.width * percent) / MAX_PERCENTAGE, y: box.height / 2 },
|
|
71
|
-
});
|
|
72
|
-
await moveMouseOutOfTheWay(window);
|
|
73
|
-
await waitForActionSettled(window);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const COLOR_CANVAS_OFFSET = 5;
|
|
77
|
-
|
|
78
|
-
async function setColorBlack(
|
|
79
|
-
window: Page,
|
|
80
|
-
menuTestId: string,
|
|
81
|
-
container: Page | Locator = window,
|
|
82
|
-
): Promise<void> {
|
|
83
|
-
await setColoringStyle(window, menuTestId, "Constant", container);
|
|
84
|
-
const canvas = container.getByTestId("colorPicker").locator(".v-color-picker-canvas").first();
|
|
85
|
-
const box = await canvas.boundingBox();
|
|
86
|
-
if (!box) {
|
|
87
|
-
throw new Error("Could not get bounding box of the color canvas");
|
|
88
|
-
}
|
|
89
|
-
await canvas.click({
|
|
90
|
-
position: { x: COLOR_CANVAS_OFFSET, y: box.height - COLOR_CANVAS_OFFSET },
|
|
91
|
-
});
|
|
92
|
-
await waitForActionSettled(window);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
async function copyColor(
|
|
96
|
-
window: Page,
|
|
97
|
-
menuTestId: string,
|
|
98
|
-
container: Page | Locator = window,
|
|
99
|
-
): Promise<void> {
|
|
100
|
-
await setColoringStyle(window, menuTestId, "Constant", container);
|
|
101
|
-
await clickCopyColorBtn(window, container);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
async function setColorInput(
|
|
105
|
-
window: Page,
|
|
106
|
-
menuTestId: string,
|
|
107
|
-
colorText: string,
|
|
108
|
-
container: Page | Locator = window,
|
|
109
|
-
): Promise<void> {
|
|
110
|
-
await setColoringStyle(window, menuTestId, "Constant", container);
|
|
111
|
-
await setColorInputText(window, colorText, container);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
async function pasteColorInput(
|
|
115
|
-
window: Page,
|
|
116
|
-
menuTestId: string,
|
|
117
|
-
container: Page | Locator = window,
|
|
118
|
-
): Promise<void> {
|
|
119
|
-
await setColoringStyle(window, menuTestId, "Constant", container);
|
|
120
|
-
await pasteColorInputText(window, container);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
async function setFeatureColorBlack(
|
|
124
|
-
window: Page,
|
|
125
|
-
viewerObjectType: string,
|
|
126
|
-
feature: string,
|
|
127
|
-
container: Page | Locator = window,
|
|
128
|
-
): Promise<void> {
|
|
129
|
-
await setColorBlack(window, `${viewerObjectType}${feature}Menu`, container);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
async function setFeatureColor(
|
|
133
|
-
window: Page,
|
|
134
|
-
viewerObjectType: string,
|
|
135
|
-
feature: string,
|
|
136
|
-
container: Page | Locator = window,
|
|
137
|
-
): Promise<void> {
|
|
138
|
-
await setColor(window, `${viewerObjectType}${feature}Menu`, container);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
async function setFeatureColorWithSlider(
|
|
142
|
-
window: Page,
|
|
143
|
-
viewerObjectType: string,
|
|
144
|
-
feature: string,
|
|
145
|
-
container: Page | Locator = window,
|
|
146
|
-
): Promise<void> {
|
|
147
|
-
await setColorWithSlider(window, `${viewerObjectType}${feature}Menu`, container);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
async function setFeatureCopyColor(
|
|
151
|
-
window: Page,
|
|
152
|
-
viewerObjectType: string,
|
|
153
|
-
feature: string,
|
|
154
|
-
container: Page | Locator = window,
|
|
155
|
-
): Promise<void> {
|
|
156
|
-
await copyColor(window, `${viewerObjectType}${feature}Menu`, container);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
async function setFeatureColorInput(
|
|
160
|
-
window: Page,
|
|
161
|
-
viewerObjectType: string,
|
|
162
|
-
feature: string,
|
|
163
|
-
colorText: string,
|
|
164
|
-
container: Page | Locator = window,
|
|
165
|
-
): Promise<void> {
|
|
166
|
-
await setColorInput(window, `${viewerObjectType}${feature}Menu`, colorText, container);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
async function setFeaturePasteColorInput(
|
|
170
|
-
window: Page,
|
|
171
|
-
viewerObjectType: string,
|
|
172
|
-
feature: string,
|
|
173
|
-
container: Page | Locator = window,
|
|
174
|
-
): Promise<void> {
|
|
175
|
-
await pasteColorInput(window, `${viewerObjectType}${feature}Menu`, container);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
async function setFeatureColoringStyle(
|
|
179
|
-
window: Page,
|
|
180
|
-
viewerObjectType: string,
|
|
181
|
-
feature: string,
|
|
182
|
-
coloringStyle: string,
|
|
183
|
-
container: Page | Locator = window,
|
|
184
|
-
): Promise<void> {
|
|
185
|
-
await setColoringStyle(window, `${viewerObjectType}${feature}Menu`, coloringStyle, container);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
async function setFeatureOpacity(
|
|
189
|
-
window: Page,
|
|
190
|
-
viewerObjectType: string,
|
|
191
|
-
feature: string,
|
|
192
|
-
percent: number,
|
|
193
|
-
): Promise<void> {
|
|
194
|
-
await setOpacity(window, `${viewerObjectType}${feature}Menu`, percent);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export {
|
|
198
|
-
copyColor,
|
|
199
|
-
setColor,
|
|
200
|
-
setColorBlack,
|
|
201
|
-
setColorInput,
|
|
202
|
-
setColorWithSlider,
|
|
203
|
-
setColoringStyle,
|
|
204
|
-
setOpacity,
|
|
205
|
-
pasteColorInput,
|
|
206
|
-
setFeatureColor,
|
|
207
|
-
setFeatureColorBlack,
|
|
208
|
-
setFeatureColorInput,
|
|
209
|
-
setFeatureColoringStyle,
|
|
210
|
-
setFeatureColorWithSlider,
|
|
211
|
-
setFeatureCopyColor,
|
|
212
|
-
setFeatureOpacity,
|
|
213
|
-
setFeaturePasteColorInput,
|
|
214
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { Locator, Page } from "@playwright/test";
|
|
2
|
-
import { moveMouseOutOfTheWay } from "@vease_tests/utils/app_interaction";
|
|
3
|
-
import { waitForActionSettled } from "@vease_tests/utils/wait_for_action_settled";
|
|
4
|
-
|
|
5
|
-
const MAX_PERCENTAGE = 100;
|
|
6
|
-
const SLIDER_BLUE = 0.7;
|
|
7
|
-
const SLIDER_PINK = 0.85;
|
|
8
|
-
|
|
9
|
-
async function clickColorPickerCanvas(
|
|
10
|
-
window: Page,
|
|
11
|
-
container: Page | Locator = window,
|
|
12
|
-
): Promise<void> {
|
|
13
|
-
await container.getByTestId("colorPicker").locator(".v-color-picker-canvas").first().click();
|
|
14
|
-
await moveMouseOutOfTheWay(window);
|
|
15
|
-
await waitForActionSettled(window);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async function clickColorPickerSlider(
|
|
19
|
-
window: Page,
|
|
20
|
-
container: Page | Locator | number = window,
|
|
21
|
-
percentage: number = SLIDER_BLUE,
|
|
22
|
-
): Promise<void> {
|
|
23
|
-
const targetContainer: Page | Locator = typeof container === "number" ? window : container;
|
|
24
|
-
const targetPercentage: number = typeof container === "number" ? container : percentage;
|
|
25
|
-
const rgbaSlider = targetContainer.getByTestId("colorPicker").locator(".v-slider").first();
|
|
26
|
-
const rgbaBox = await rgbaSlider.boundingBox();
|
|
27
|
-
if (!rgbaBox) {
|
|
28
|
-
throw new Error("Could not get bounding box of the color slider");
|
|
29
|
-
}
|
|
30
|
-
await rgbaSlider.click({
|
|
31
|
-
position: { x: rgbaBox.width * targetPercentage, y: rgbaBox.height / 2 },
|
|
32
|
-
});
|
|
33
|
-
await waitForActionSettled(window);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async function clickCopyColorBtn(window: Page, container: Page | Locator = window): Promise<void> {
|
|
37
|
-
await container.getByTestId("copyColorBtn").click();
|
|
38
|
-
await moveMouseOutOfTheWay(window);
|
|
39
|
-
await waitForActionSettled(window);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async function setColorInputText(
|
|
43
|
-
window: Page,
|
|
44
|
-
text: string,
|
|
45
|
-
container: Page | Locator = window,
|
|
46
|
-
): Promise<void> {
|
|
47
|
-
const input = container.getByTestId("colorInput");
|
|
48
|
-
await input.fill(text);
|
|
49
|
-
await input.press("Enter");
|
|
50
|
-
await waitForActionSettled(window);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function pasteColorInputText(
|
|
54
|
-
window: Page,
|
|
55
|
-
container: Page | Locator = window,
|
|
56
|
-
): Promise<void> {
|
|
57
|
-
const textToPaste = await window.evaluate(async () => {
|
|
58
|
-
const clipboardText = await navigator.clipboard.readText();
|
|
59
|
-
return clipboardText;
|
|
60
|
-
});
|
|
61
|
-
const input = container.getByTestId("colorInput");
|
|
62
|
-
await input.focus();
|
|
63
|
-
await input.evaluate((inputElement, data) => {
|
|
64
|
-
const dataTransfer = new DataTransfer();
|
|
65
|
-
dataTransfer.setData("text/plain", data);
|
|
66
|
-
inputElement.dispatchEvent(
|
|
67
|
-
new ClipboardEvent("paste", { clipboardData: dataTransfer, bubbles: true }),
|
|
68
|
-
);
|
|
69
|
-
}, textToPaste);
|
|
70
|
-
await waitForActionSettled(window);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export {
|
|
74
|
-
clickColorPickerCanvas,
|
|
75
|
-
clickColorPickerSlider,
|
|
76
|
-
clickCopyColorBtn,
|
|
77
|
-
setColorInputText,
|
|
78
|
-
pasteColorInputText,
|
|
79
|
-
MAX_PERCENTAGE,
|
|
80
|
-
SLIDER_BLUE,
|
|
81
|
-
SLIDER_PINK,
|
|
82
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ensureFeatureVisible, ensureMenuOpen } from "@vease_tests/utils/viewer_interaction";
|
|
2
|
-
import type { Page } from "@playwright/test";
|
|
3
|
-
import { waitForActionSettled } from "@vease_tests/utils/wait_for_action_settled";
|
|
4
|
-
|
|
5
|
-
interface Texture {
|
|
6
|
-
name: string;
|
|
7
|
-
filePath: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
async function selectOverlayListItem(window: Page, text: string): Promise<void> {
|
|
11
|
-
await window
|
|
12
|
-
.locator(".v-overlay-container")
|
|
13
|
-
.locator(".v-list-item")
|
|
14
|
-
.filter({ hasText: text, visible: true })
|
|
15
|
-
.first()
|
|
16
|
-
.click();
|
|
17
|
-
await waitForActionSettled(window);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
async function setFeatureTextures(
|
|
21
|
-
window: Page,
|
|
22
|
-
menuTestId: string,
|
|
23
|
-
texture: Texture,
|
|
24
|
-
): Promise<void> {
|
|
25
|
-
await ensureMenuOpen(window, menuTestId);
|
|
26
|
-
await ensureFeatureVisible(window, menuTestId);
|
|
27
|
-
const container = window.getByTestId(menuTestId);
|
|
28
|
-
await container.getByTestId("coloringStyleSelector").first().click();
|
|
29
|
-
await waitForActionSettled(window);
|
|
30
|
-
await selectOverlayListItem(window, "Textures");
|
|
31
|
-
|
|
32
|
-
await container.getByTestId("textureNameSelector").first().click();
|
|
33
|
-
await waitForActionSettled(window);
|
|
34
|
-
await selectOverlayListItem(window, texture.name);
|
|
35
|
-
|
|
36
|
-
const fileInput = container.locator('input[type="file"][accept*="image/png"]').first();
|
|
37
|
-
await fileInput.setInputFiles(texture.filePath);
|
|
38
|
-
await waitForActionSettled(window);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { setFeatureTextures };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SLIDER_PINK,
|
|
3
|
-
clickColorPickerCanvas,
|
|
4
|
-
clickColorPickerSlider,
|
|
5
|
-
} from "@vease_tests/utils/data/helpers/color_picker";
|
|
6
|
-
import {
|
|
7
|
-
cellAttributeType,
|
|
8
|
-
cellsFeatureName,
|
|
9
|
-
meshViewerObjectType,
|
|
10
|
-
vertexAttributeType,
|
|
11
|
-
} from "@vease_tests/utils/constants";
|
|
12
|
-
import {
|
|
13
|
-
ensureMenuOpen,
|
|
14
|
-
moveMouseOutOfTheWay,
|
|
15
|
-
openStyleMenu,
|
|
16
|
-
} from "@vease_tests/utils/viewer_interaction";
|
|
17
|
-
import {
|
|
18
|
-
setFeatureAttribute,
|
|
19
|
-
setFeatureColorMap,
|
|
20
|
-
setFeatureItem,
|
|
21
|
-
} from "@vease_tests/utils/data/helpers/attribute";
|
|
22
|
-
import type { Page } from "@playwright/test";
|
|
23
|
-
import { waitForActionSettled } from "@vease_tests/utils/wait_for_action_settled";
|
|
24
|
-
|
|
25
|
-
interface AttributeOptions {
|
|
26
|
-
item?: number;
|
|
27
|
-
colorMap?: string;
|
|
28
|
-
min?: number | string;
|
|
29
|
-
max?: number | string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function setMeshCellsVertexAttribute(
|
|
33
|
-
window: Page,
|
|
34
|
-
attributeName: string,
|
|
35
|
-
options: AttributeOptions = {},
|
|
36
|
-
): Promise<void> {
|
|
37
|
-
await setFeatureAttribute(
|
|
38
|
-
window,
|
|
39
|
-
meshViewerObjectType,
|
|
40
|
-
cellsFeatureName,
|
|
41
|
-
vertexAttributeType,
|
|
42
|
-
attributeName,
|
|
43
|
-
options,
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async function setMeshCellsCellAttribute(
|
|
48
|
-
window: Page,
|
|
49
|
-
attributeName: string,
|
|
50
|
-
options: AttributeOptions = {},
|
|
51
|
-
): Promise<void> {
|
|
52
|
-
await setFeatureAttribute(
|
|
53
|
-
window,
|
|
54
|
-
meshViewerObjectType,
|
|
55
|
-
cellsFeatureName,
|
|
56
|
-
cellAttributeType,
|
|
57
|
-
attributeName,
|
|
58
|
-
options,
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async function setMeshCellsItem(window: Page, item: number): Promise<void> {
|
|
63
|
-
const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
|
|
64
|
-
await setFeatureItem(window, menuTestId, item);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
async function setMeshCellsColorMap(window: Page, colorMap: string): Promise<void> {
|
|
68
|
-
const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
|
|
69
|
-
await setFeatureColorMap(window, menuTestId, colorMap);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async function openMeshCellsMenu(window: Page): Promise<void> {
|
|
73
|
-
const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
|
|
74
|
-
await openStyleMenu(window, menuTestId);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function setMeshCellsNoDataColor(window: Page): Promise<void> {
|
|
78
|
-
const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
|
|
79
|
-
await ensureMenuOpen(window, menuTestId);
|
|
80
|
-
const noDataColorBtn = window.getByTestId("noDataColorBtn").first();
|
|
81
|
-
await noDataColorBtn.waitFor({ state: "visible" });
|
|
82
|
-
await noDataColorBtn.click();
|
|
83
|
-
await waitForActionSettled(window);
|
|
84
|
-
await window
|
|
85
|
-
.getByTestId("colorPicker")
|
|
86
|
-
.filter({ visible: true })
|
|
87
|
-
.first()
|
|
88
|
-
.waitFor({ state: "visible" });
|
|
89
|
-
await clickColorPickerSlider(window, SLIDER_PINK);
|
|
90
|
-
await clickColorPickerCanvas(window);
|
|
91
|
-
await noDataColorBtn.click();
|
|
92
|
-
await moveMouseOutOfTheWay(window);
|
|
93
|
-
await waitForActionSettled(window);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export {
|
|
97
|
-
openMeshCellsMenu,
|
|
98
|
-
setMeshCellsCellAttribute,
|
|
99
|
-
setMeshCellsColorMap,
|
|
100
|
-
setMeshCellsItem,
|
|
101
|
-
setMeshCellsNoDataColor,
|
|
102
|
-
setMeshCellsVertexAttribute,
|
|
103
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Locator, Page } from "@playwright/test";
|
|
2
|
-
import { cellsFeatureName, meshViewerObjectType } from "@vease_tests/utils/constants";
|
|
3
|
-
import {
|
|
4
|
-
setFeatureColor,
|
|
5
|
-
setFeatureColorInput,
|
|
6
|
-
setFeatureColorWithSlider,
|
|
7
|
-
setFeatureColoringStyle,
|
|
8
|
-
setFeatureCopyColor,
|
|
9
|
-
setFeatureOpacity,
|
|
10
|
-
setFeaturePasteColorInput,
|
|
11
|
-
} from "@vease_tests/utils/data/helpers/color";
|
|
12
|
-
|
|
13
|
-
async function setMeshCellsOpacity(window: Page, percent: number): Promise<void> {
|
|
14
|
-
await setFeatureOpacity(window, meshViewerObjectType, cellsFeatureName, percent);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async function setMeshCellsColor(window: Page): Promise<void> {
|
|
18
|
-
await setFeatureColor(window, meshViewerObjectType, cellsFeatureName);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async function setMeshCellsColorWithSlider(window: Page): Promise<void> {
|
|
22
|
-
await setFeatureColorWithSlider(window, meshViewerObjectType, cellsFeatureName);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async function copyMeshCellsColor(window: Page): Promise<void> {
|
|
26
|
-
await setFeatureCopyColor(window, meshViewerObjectType, cellsFeatureName);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function setMeshCellsColorInput(window: Page, colorText: string): Promise<void> {
|
|
30
|
-
await setFeatureColorInput(window, meshViewerObjectType, cellsFeatureName, colorText);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async function pasteMeshCellsColorInput(
|
|
34
|
-
window: Page,
|
|
35
|
-
container: Page | Locator = window,
|
|
36
|
-
): Promise<void> {
|
|
37
|
-
await setFeaturePasteColorInput(window, meshViewerObjectType, cellsFeatureName, container);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async function setMeshCellsColoringStyle(window: Page, style: string): Promise<void> {
|
|
41
|
-
await setFeatureColoringStyle(window, meshViewerObjectType, cellsFeatureName, style);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
copyMeshCellsColor,
|
|
46
|
-
pasteMeshCellsColorInput,
|
|
47
|
-
setMeshCellsColor,
|
|
48
|
-
setMeshCellsColorInput,
|
|
49
|
-
setMeshCellsColorWithSlider,
|
|
50
|
-
setMeshCellsColoringStyle,
|
|
51
|
-
setMeshCellsOpacity,
|
|
52
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Page } from "@playwright/test";
|
|
2
|
-
import { meshViewerObjectType } from "@vease_tests/utils/constants";
|
|
3
|
-
import { setCellsVisibility } from "@vease_tests/utils/viewer_interaction";
|
|
4
|
-
|
|
5
|
-
async function setMeshCellsVisibility(window: Page, visibility: boolean): Promise<void> {
|
|
6
|
-
await setCellsVisibility(window, meshViewerObjectType, visibility);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { setMeshCellsVisibility };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SLIDER_PINK,
|
|
3
|
-
clickColorPickerCanvas,
|
|
4
|
-
clickColorPickerSlider,
|
|
5
|
-
} from "@vease_tests/utils/data/helpers/color_picker";
|
|
6
|
-
import {
|
|
7
|
-
edgeAttributeType,
|
|
8
|
-
edgesFeatureName,
|
|
9
|
-
meshViewerObjectType,
|
|
10
|
-
vertexAttributeType,
|
|
11
|
-
} from "@vease_tests/utils/constants";
|
|
12
|
-
import {
|
|
13
|
-
ensureMenuOpen,
|
|
14
|
-
moveMouseOutOfTheWay,
|
|
15
|
-
openStyleMenu,
|
|
16
|
-
} from "@vease_tests/utils/viewer_interaction";
|
|
17
|
-
import {
|
|
18
|
-
setFeatureAttribute,
|
|
19
|
-
setFeatureColorMap,
|
|
20
|
-
setFeatureItem,
|
|
21
|
-
} from "@vease_tests/utils/data/helpers/attribute";
|
|
22
|
-
import type { Page } from "@playwright/test";
|
|
23
|
-
import { waitForActionSettled } from "@vease_tests/utils/wait_for_action_settled";
|
|
24
|
-
|
|
25
|
-
interface AttributeOptions {
|
|
26
|
-
item?: number;
|
|
27
|
-
colorMap?: string;
|
|
28
|
-
min?: number | string;
|
|
29
|
-
max?: number | string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function setMeshEdgesVertexAttribute(
|
|
33
|
-
window: Page,
|
|
34
|
-
attributeName: string,
|
|
35
|
-
options: AttributeOptions = {},
|
|
36
|
-
): Promise<void> {
|
|
37
|
-
await setFeatureAttribute(
|
|
38
|
-
window,
|
|
39
|
-
meshViewerObjectType,
|
|
40
|
-
edgesFeatureName,
|
|
41
|
-
vertexAttributeType,
|
|
42
|
-
attributeName,
|
|
43
|
-
options,
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async function setMeshEdgesEdgeAttribute(
|
|
48
|
-
window: Page,
|
|
49
|
-
attributeName: string,
|
|
50
|
-
options: AttributeOptions = {},
|
|
51
|
-
): Promise<void> {
|
|
52
|
-
await setFeatureAttribute(
|
|
53
|
-
window,
|
|
54
|
-
meshViewerObjectType,
|
|
55
|
-
edgesFeatureName,
|
|
56
|
-
edgeAttributeType,
|
|
57
|
-
attributeName,
|
|
58
|
-
options,
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async function setMeshEdgesItem(window: Page, item: number): Promise<void> {
|
|
63
|
-
const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
|
|
64
|
-
await setFeatureItem(window, menuTestId, item);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
async function setMeshEdgesColorMap(window: Page, colorMap: string): Promise<void> {
|
|
68
|
-
const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
|
|
69
|
-
await setFeatureColorMap(window, menuTestId, colorMap);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async function openMeshEdgesMenu(window: Page): Promise<void> {
|
|
73
|
-
const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
|
|
74
|
-
await openStyleMenu(window, menuTestId);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function setMeshEdgesNoDataColor(window: Page): Promise<void> {
|
|
78
|
-
const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
|
|
79
|
-
await ensureMenuOpen(window, menuTestId);
|
|
80
|
-
const noDataColorBtn = window.getByTestId("noDataColorBtn").first();
|
|
81
|
-
await noDataColorBtn.waitFor({ state: "visible" });
|
|
82
|
-
await noDataColorBtn.click();
|
|
83
|
-
await waitForActionSettled(window);
|
|
84
|
-
await window
|
|
85
|
-
.getByTestId("colorPicker")
|
|
86
|
-
.filter({ visible: true })
|
|
87
|
-
.first()
|
|
88
|
-
.waitFor({ state: "visible" });
|
|
89
|
-
await clickColorPickerSlider(window, SLIDER_PINK);
|
|
90
|
-
await clickColorPickerCanvas(window);
|
|
91
|
-
await noDataColorBtn.click();
|
|
92
|
-
await moveMouseOutOfTheWay(window);
|
|
93
|
-
await waitForActionSettled(window);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export {
|
|
97
|
-
openMeshEdgesMenu,
|
|
98
|
-
setMeshEdgesColorMap,
|
|
99
|
-
setMeshEdgesEdgeAttribute,
|
|
100
|
-
setMeshEdgesItem,
|
|
101
|
-
setMeshEdgesNoDataColor,
|
|
102
|
-
setMeshEdgesVertexAttribute,
|
|
103
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Locator, Page } from "@playwright/test";
|
|
2
|
-
import { edgesFeatureName, meshViewerObjectType } from "@vease_tests/utils/constants";
|
|
3
|
-
import {
|
|
4
|
-
setFeatureColor,
|
|
5
|
-
setFeatureColorInput,
|
|
6
|
-
setFeatureColorWithSlider,
|
|
7
|
-
setFeatureColoringStyle,
|
|
8
|
-
setFeatureCopyColor,
|
|
9
|
-
setFeatureOpacity,
|
|
10
|
-
setFeaturePasteColorInput,
|
|
11
|
-
} from "@vease_tests/utils/data/helpers/color";
|
|
12
|
-
|
|
13
|
-
async function setMeshEdgesOpacity(window: Page, percent: number): Promise<void> {
|
|
14
|
-
await setFeatureOpacity(window, meshViewerObjectType, edgesFeatureName, percent);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async function setMeshEdgesColor(window: Page): Promise<void> {
|
|
18
|
-
await setFeatureColor(window, meshViewerObjectType, edgesFeatureName);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async function setMeshEdgesColorWithSlider(window: Page): Promise<void> {
|
|
22
|
-
await setFeatureColorWithSlider(window, meshViewerObjectType, edgesFeatureName);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async function copyMeshEdgesColor(window: Page): Promise<void> {
|
|
26
|
-
await setFeatureCopyColor(window, meshViewerObjectType, edgesFeatureName);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function setMeshEdgesColorInput(window: Page, colorText: string): Promise<void> {
|
|
30
|
-
await setFeatureColorInput(window, meshViewerObjectType, edgesFeatureName, colorText);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async function pasteMeshEdgesColorInput(
|
|
34
|
-
window: Page,
|
|
35
|
-
container: Page | Locator = window,
|
|
36
|
-
): Promise<void> {
|
|
37
|
-
await setFeaturePasteColorInput(window, meshViewerObjectType, edgesFeatureName, container);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async function setMeshEdgesColoringStyle(window: Page, style: string): Promise<void> {
|
|
41
|
-
await setFeatureColoringStyle(window, meshViewerObjectType, edgesFeatureName, style);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
setMeshEdgesOpacity,
|
|
46
|
-
setMeshEdgesColor,
|
|
47
|
-
setMeshEdgesColorWithSlider,
|
|
48
|
-
copyMeshEdgesColor,
|
|
49
|
-
setMeshEdgesColorInput,
|
|
50
|
-
pasteMeshEdgesColorInput,
|
|
51
|
-
setMeshEdgesColoringStyle,
|
|
52
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Page } from "@playwright/test";
|
|
2
|
-
import { meshViewerObjectType } from "@vease_tests/utils/constants.js";
|
|
3
|
-
import { setEdgesVisibility } from "@vease_tests/utils/viewer_interaction.js";
|
|
4
|
-
|
|
5
|
-
async function setMeshEdgesVisibility(window: Page, visibility: boolean): Promise<void> {
|
|
6
|
-
await setEdgesVisibility(window, meshViewerObjectType, visibility);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { setMeshEdgesVisibility };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Page } from "@playwright/test";
|
|
2
|
-
import { meshViewerObjectType } from "@vease_tests/utils/constants.js";
|
|
3
|
-
import { setEdgesWidth } from "@vease_tests/utils/viewer_interaction.js";
|
|
4
|
-
|
|
5
|
-
async function setMeshEdgesWidth(window: Page, value: number): Promise<void> {
|
|
6
|
-
await setEdgesWidth(window, meshViewerObjectType, value);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { setMeshEdgesWidth };
|