vease 1.59.0-rc.2 → 1.59.0-rc.4

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.
Files changed (61) hide show
  1. package/.build/tests/e2e/utils/camera_filters.js +105 -0
  2. package/.build/tests/e2e/utils/camera_interaction.js +5 -128
  3. package/.build/tests/e2e/utils/camera_tools.js +43 -0
  4. package/.build/tests/e2e/utils/create_objects.js +2 -1
  5. package/.build/tests/e2e/utils/crs_flows.js +47 -0
  6. package/.build/tests/e2e/utils/crs_test_data.js +39 -0
  7. package/.build/tests/e2e/utils/data/helpers/attribute.js +4 -50
  8. package/.build/tests/e2e/utils/data/helpers/attribute_colors.js +47 -0
  9. package/.build/tests/e2e/utils/data/helpers/attribute_menu.js +13 -0
  10. package/.build/tests/e2e/utils/data/helpers/color.js +2 -1
  11. package/.build/tests/e2e/utils/data/helpers/textures.js +2 -1
  12. package/.build/tests/e2e/utils/data/mesh/cells/attribute.js +4 -2
  13. package/.build/tests/e2e/utils/data/mesh/cells/visibility.js +2 -1
  14. package/.build/tests/e2e/utils/data/mesh/edges/attribute.js +4 -2
  15. package/.build/tests/e2e/utils/data/mesh/edges/visibility.js +2 -1
  16. package/.build/tests/e2e/utils/data/mesh/edges/width.js +2 -1
  17. package/.build/tests/e2e/utils/data/mesh/points/attribute.js +2 -1
  18. package/.build/tests/e2e/utils/data/mesh/points/size.js +2 -1
  19. package/.build/tests/e2e/utils/data/mesh/points/visibility.js +2 -1
  20. package/.build/tests/e2e/utils/data/mesh/polygon/attribute.js +4 -2
  21. package/.build/tests/e2e/utils/data/mesh/polygon/visibility.js +2 -1
  22. package/.build/tests/e2e/utils/data/mesh/polyhedra/attribute.js +4 -2
  23. package/.build/tests/e2e/utils/data/mesh/polyhedra/visibility.js +2 -1
  24. package/.build/tests/e2e/utils/data/model/attribute.js +2 -1
  25. package/.build/tests/e2e/utils/data/model/edges/components.js +2 -1
  26. package/.build/tests/e2e/utils/data/model/edges/visibility.js +2 -1
  27. package/.build/tests/e2e/utils/data/model/points/components.js +2 -1
  28. package/.build/tests/e2e/utils/data/model/points/visibility.js +2 -1
  29. package/.build/tests/e2e/utils/data/model/style_menu.js +2 -1
  30. package/.build/tests/e2e/utils/data/model/surfaces/visibility.js +2 -1
  31. package/.build/tests/e2e/utils/extension.js +1 -1
  32. package/.build/tests/e2e/utils/fixtures.js +1 -1
  33. package/.build/tests/e2e/utils/navigate.js +7 -159
  34. package/.build/tests/e2e/utils/navigate_cloud.js +64 -0
  35. package/.build/tests/e2e/utils/navigate_config.js +14 -0
  36. package/.build/tests/e2e/utils/navigate_desktop.js +61 -0
  37. package/.build/tests/e2e/utils/navigate_executable.js +21 -0
  38. package/.build/tests/e2e/utils/navigate_ready.js +21 -0
  39. package/.build/tests/e2e/utils/object_trees/model_components_object_tree.js +2 -1
  40. package/.build/tests/e2e/utils/viewer_canvas.js +79 -0
  41. package/.build/tests/e2e/utils/viewer_interaction.js +2 -166
  42. package/.build/tests/e2e/utils/viewer_menu.js +98 -0
  43. package/package.json +1 -1
  44. package/tests/e2e/utils/camera_filters.ts +172 -0
  45. package/tests/e2e/utils/camera_interaction.ts +9 -187
  46. package/tests/e2e/utils/camera_tools.ts +62 -0
  47. package/tests/e2e/utils/crs_flows.ts +91 -0
  48. package/tests/e2e/utils/crs_test_data.ts +32 -0
  49. package/tests/e2e/utils/data/helpers/attribute.ts +5 -99
  50. package/tests/e2e/utils/data/helpers/attribute_colors.ts +83 -0
  51. package/tests/e2e/utils/data/helpers/attribute_menu.ts +19 -0
  52. package/tests/e2e/utils/data/mesh/index.ts +1 -0
  53. package/tests/e2e/utils/navigate.ts +13 -219
  54. package/tests/e2e/utils/navigate_cloud.ts +103 -0
  55. package/tests/e2e/utils/navigate_config.ts +22 -0
  56. package/tests/e2e/utils/navigate_desktop.ts +73 -0
  57. package/tests/e2e/utils/navigate_executable.ts +34 -0
  58. package/tests/e2e/utils/navigate_ready.ts +36 -0
  59. package/tests/e2e/utils/viewer_canvas.ts +128 -0
  60. package/tests/e2e/utils/viewer_interaction.ts +14 -303
  61. package/tests/e2e/utils/viewer_menu.ts +205 -0
@@ -0,0 +1,105 @@
1
+ import { waitForActionSettled } from "./wait_for_action_settled.js";
2
+ //#region tests/e2e/utils/camera_filters.ts
3
+ async function toggleShrinkFilter(window) {
4
+ await window.getByTestId("shrinkFilterButton").click();
5
+ await waitForActionSettled(window);
6
+ }
7
+ async function setSliderRatio(window, sliderTestId, ratio) {
8
+ const slider = window.getByTestId(sliderTestId);
9
+ const box = await slider.boundingBox();
10
+ if (!box) throw new Error(`Could not get bounding box of the ${sliderTestId} slider.`);
11
+ await slider.click({ position: {
12
+ x: box.width * ratio,
13
+ y: box.height / 2
14
+ } });
15
+ await waitForActionSettled(window);
16
+ }
17
+ async function setShrinkFactor(window, shrinkFactorValue) {
18
+ await setSliderRatio(window, "shrinkFactorSlider", shrinkFactorValue);
19
+ }
20
+ async function resetShrinkFilter(window) {
21
+ await window.getByTestId("resetShrinkButton").click();
22
+ await waitForActionSettled(window);
23
+ }
24
+ async function toggleShrinkTargetAllVisible(window) {
25
+ await window.getByTestId("shrinkTargetAllVisibleSwitch").getByRole("checkbox").click();
26
+ await waitForActionSettled(window);
27
+ }
28
+ async function selectShrinkDatasets(window, datasetName, index = 0) {
29
+ const select = window.getByTestId("shrinkSelectedDatasetsSelect");
30
+ await select.click();
31
+ await waitForActionSettled(window);
32
+ await window.getByRole("option", { name: datasetName }).nth(index).click();
33
+ await waitForActionSettled(window);
34
+ await select.click();
35
+ await waitForActionSettled(window);
36
+ }
37
+ async function toggleExplodeFilter(window) {
38
+ await window.getByTestId("explodeFilterButton").click();
39
+ await waitForActionSettled(window);
40
+ }
41
+ async function setExplodeFactor(window, explodeFactorValue) {
42
+ await setSliderRatio(window, "explodeFactorSlider", explodeFactorValue);
43
+ }
44
+ async function resetExplodeFilter(window) {
45
+ await window.getByTestId("resetExplodeButton").click();
46
+ await waitForActionSettled(window);
47
+ }
48
+ async function removeExplodeFilter(window) {
49
+ await window.getByTestId("removeExplodeButton").click();
50
+ await waitForActionSettled(window);
51
+ }
52
+ async function toggleThresholdFilter(window) {
53
+ await window.getByTestId("thresholdFilterButton").click();
54
+ await waitForActionSettled(window);
55
+ }
56
+ async function selectThresholdOption(window, select, name) {
57
+ await select.click();
58
+ await waitForActionSettled(window);
59
+ await window.getByRole("option", {
60
+ name,
61
+ exact: true
62
+ }).click();
63
+ await waitForActionSettled(window);
64
+ }
65
+ function thresholdCard(window, cardIndex) {
66
+ return window.getByTestId("thresholdCard").nth(cardIndex);
67
+ }
68
+ async function selectThresholdCardAttribute(window, attributeType, attributeName, cardIndex = 0) {
69
+ const card = thresholdCard(window, cardIndex);
70
+ await selectThresholdOption(window, card.getByTestId("thresholdAttributeTypeSelect"), attributeType);
71
+ await selectThresholdOption(window, card.getByTestId("thresholdAttributeSelect"), attributeName);
72
+ }
73
+ async function selectThresholdAttribute(window, datasetName, attributeType, attributeName) {
74
+ await selectThresholdOption(window, window.getByTestId("thresholdDatasetSelect"), datasetName);
75
+ await selectThresholdCardAttribute(window, attributeType, attributeName);
76
+ }
77
+ async function selectThresholdCellAttribute(window, datasetName, attributeName) {
78
+ await selectThresholdAttribute(window, datasetName, "cell attribute", attributeName);
79
+ }
80
+ async function selectThresholdBlockPolyhedron(window, datasetName, attributeName) {
81
+ await selectThresholdAttribute(window, datasetName, "Block polyhedron attribute", attributeName);
82
+ }
83
+ async function selectThresholdSurfacePolygon(window, datasetName, attributeName) {
84
+ await selectThresholdAttribute(window, datasetName, "Surface polygon attribute", attributeName);
85
+ }
86
+ async function addThreshold(window) {
87
+ await window.getByTestId("addThresholdButton").click();
88
+ await waitForActionSettled(window);
89
+ }
90
+ async function setThresholdMinimum(window, minimum, cardIndex = 0) {
91
+ const input = thresholdCard(window, cardIndex).getByTestId("attributeMinInput").locator("input");
92
+ await input.fill(minimum.toString());
93
+ await input.press("Enter");
94
+ await waitForActionSettled(window);
95
+ }
96
+ async function resetThresholdFilter(window) {
97
+ await window.getByTestId("resetThresholdButton").click();
98
+ await waitForActionSettled(window);
99
+ }
100
+ async function removeThresholdFilter(window) {
101
+ await window.getByTestId("removeThresholdButton").click();
102
+ await waitForActionSettled(window);
103
+ }
104
+ //#endregion
105
+ export { addThreshold, removeExplodeFilter, removeThresholdFilter, resetExplodeFilter, resetShrinkFilter, resetThresholdFilter, selectShrinkDatasets, selectThresholdBlockPolyhedron, selectThresholdCardAttribute, selectThresholdCellAttribute, selectThresholdSurfacePolygon, setExplodeFactor, setShrinkFactor, setThresholdMinimum, toggleExplodeFilter, toggleShrinkFilter, toggleShrinkTargetAllVisible, toggleThresholdFilter };
@@ -1,7 +1,9 @@
1
1
  import { waitForActionSettled } from "./wait_for_action_settled.js";
2
2
  import { closeAllMenus, moveMouseOutOfTheWay } from "./app_interaction.js";
3
- import { dragElement, getHybridViewerCanvas, getHybridViewerCanvasBoundingBox } from "./viewer_interaction.js";
4
- import { expect } from "@playwright/test";
3
+ import { addThreshold, removeExplodeFilter, removeThresholdFilter, resetExplodeFilter, resetShrinkFilter, resetThresholdFilter, selectShrinkDatasets, selectThresholdBlockPolyhedron, selectThresholdCardAttribute, selectThresholdCellAttribute, selectThresholdSurfacePolygon, setExplodeFactor, setShrinkFactor, setThresholdMinimum, toggleExplodeFilter, toggleShrinkFilter, toggleShrinkTargetAllVisible, toggleThresholdFilter } from "./camera_filters.js";
4
+ import { getHybridViewerCanvas, getHybridViewerCanvasBoundingBox } from "./viewer_canvas.js";
5
+ import "./viewer_interaction.js";
6
+ import { activateZoomToBox, clearRuler, drawZoomBox, setRulerPointInput, toggleRuler, toggleRulerSnap } from "./camera_tools.js";
5
7
  //#region tests/e2e/utils/camera_interaction.ts
6
8
  async function resetCamera(window) {
7
9
  await window.getByTestId("resetCameraButton").click();
@@ -101,130 +103,5 @@ async function ensureHighlightMenuOpen(window, childButtonTestId) {
101
103
  }
102
104
  }
103
105
  }
104
- async function toggleShrinkFilter(window) {
105
- await window.getByTestId("shrinkFilterButton").click();
106
- await waitForActionSettled(window);
107
- }
108
- async function setSliderRatio(window, sliderTestId, ratio) {
109
- const slider = window.getByTestId(sliderTestId);
110
- const box = await slider.boundingBox();
111
- if (!box) throw new Error(`Could not get bounding box of the ${sliderTestId} slider.`);
112
- await slider.click({ position: {
113
- x: box.width * ratio,
114
- y: box.height / 2
115
- } });
116
- await waitForActionSettled(window);
117
- }
118
- async function setShrinkFactor(window, shrinkFactorValue) {
119
- await setSliderRatio(window, "shrinkFactorSlider", shrinkFactorValue);
120
- }
121
- async function resetShrinkFilter(window) {
122
- await window.getByTestId("resetShrinkButton").click();
123
- await waitForActionSettled(window);
124
- }
125
- async function toggleShrinkTargetAllVisible(window) {
126
- await window.getByTestId("shrinkTargetAllVisibleSwitch").getByRole("checkbox").click();
127
- await waitForActionSettled(window);
128
- }
129
- async function selectShrinkDatasets(window, datasetName, index = 0) {
130
- const select = window.getByTestId("shrinkSelectedDatasetsSelect");
131
- await select.click();
132
- await waitForActionSettled(window);
133
- await window.getByRole("option", { name: datasetName }).nth(index).click();
134
- await waitForActionSettled(window);
135
- await select.click();
136
- await waitForActionSettled(window);
137
- }
138
- async function toggleExplodeFilter(window) {
139
- await window.getByTestId("explodeFilterButton").click();
140
- await waitForActionSettled(window);
141
- }
142
- async function setExplodeFactor(window, explodeFactorValue) {
143
- await setSliderRatio(window, "explodeFactorSlider", explodeFactorValue);
144
- }
145
- async function resetExplodeFilter(window) {
146
- await window.getByTestId("resetExplodeButton").click();
147
- await waitForActionSettled(window);
148
- }
149
- async function removeExplodeFilter(window) {
150
- await window.getByTestId("removeExplodeButton").click();
151
- await waitForActionSettled(window);
152
- }
153
- async function toggleThresholdFilter(window) {
154
- await window.getByTestId("thresholdFilterButton").click();
155
- await waitForActionSettled(window);
156
- }
157
- async function selectThresholdOption(window, selectTestId, name) {
158
- await window.getByTestId(selectTestId).click();
159
- await waitForActionSettled(window);
160
- await window.getByRole("option", {
161
- name,
162
- exact: true
163
- }).click();
164
- await waitForActionSettled(window);
165
- }
166
- async function selectThresholdAttribute(window, datasetName, attributeType, attributeName) {
167
- await selectThresholdOption(window, "thresholdDatasetSelect", datasetName);
168
- await selectThresholdOption(window, "thresholdAttributeTypeSelect", attributeType);
169
- await selectThresholdOption(window, "thresholdAttributeSelect", attributeName);
170
- }
171
- async function selectThresholdCellAttribute(window, datasetName, attributeName) {
172
- await selectThresholdAttribute(window, datasetName, "cell attribute", attributeName);
173
- }
174
- async function selectThresholdBlockPolyhedron(window, datasetName, attributeName) {
175
- await selectThresholdAttribute(window, datasetName, "Block polyhedron attribute", attributeName);
176
- }
177
- async function selectThresholdSurfacePolygon(window, datasetName, attributeName) {
178
- await selectThresholdAttribute(window, datasetName, "Surface polygon attribute", attributeName);
179
- }
180
- async function setThresholdMinimum(window, minimum) {
181
- const input = window.getByTestId("thresholdFilterPanel").getByTestId("attributeMinInput").locator("input");
182
- await input.fill(minimum.toString());
183
- await input.press("Enter");
184
- await waitForActionSettled(window);
185
- }
186
- async function resetThresholdFilter(window) {
187
- await window.getByTestId("resetThresholdButton").click();
188
- await waitForActionSettled(window);
189
- }
190
- async function removeThresholdFilter(window) {
191
- await window.getByTestId("removeThresholdButton").click();
192
- await waitForActionSettled(window);
193
- }
194
- async function toggleRuler(window) {
195
- await closeAllMenus(window);
196
- await window.getByTestId("rulerButton").click();
197
- await waitForActionSettled(window);
198
- }
199
- async function toggleRulerSnap(window) {
200
- await window.getByTestId("rulerSnapToggle").getByRole("checkbox").click();
201
- await waitForActionSettled(window);
202
- }
203
- async function setRulerPointInput(window, pointIndex, coords) {
204
- const card = window.getByTestId("rulerPointCard").nth(pointIndex - 1);
205
- for (let axis = 0; axis < coords.length; axis += 1) await card.getByTestId("rulerPointCoordInput").nth(axis).locator("input").fill(coords[axis].toString());
206
- await window.getByTestId("rulerApplyButton").click();
207
- await waitForActionSettled(window);
208
- }
209
- async function clearRuler(window) {
210
- await window.getByTestId("rulerClearButton").click();
211
- await waitForActionSettled(window);
212
- }
213
- async function activateZoomToBox(window) {
214
- await closeAllMenus(window);
215
- await window.getByTestId("zoomToBoxButton").click();
216
- await waitForActionSettled(window);
217
- await expect(window.getByTestId("zoomBoxActiveChip")).toBeVisible();
218
- }
219
- async function drawZoomBox(window, deltaX, deltaY) {
220
- const overlay = window.getByTestId("zoomBoxOverlay");
221
- await dragElement(window, overlay, {
222
- deltaX,
223
- deltaY
224
- });
225
- await moveMouseOutOfTheWay(window);
226
- await waitForActionSettled(window);
227
- await expect(window.getByTestId("zoomBoxActiveChip")).toBeHidden();
228
- }
229
106
  //#endregion
230
- export { activateZoomToBox, clearRuler, closeCameraManager, drawZoomBox, ensureHighlightMenuOpen, removeExplodeFilter, removeThresholdFilter, resetCamera, resetExplodeFilter, resetShrinkFilter, resetThresholdFilter, restoreCameraPosition, rotateCamera, saveCameraPosition, selectCameraOrientation, selectShrinkDatasets, selectThresholdBlockPolyhedron, selectThresholdCellAttribute, selectThresholdSurfacePolygon, setExplodeFactor, setRulerPointInput, setShrinkFactor, setThresholdMinimum, setZScaling, toggleCameraManager, toggleCameraOrientation, toggleCenterOnClick, toggleExplodeFilter, toggleGridScale, toggleRuler, toggleRulerSnap, toggleShrinkFilter, toggleShrinkTargetAllVisible, toggleThresholdFilter };
107
+ export { activateZoomToBox, addThreshold, clearRuler, closeCameraManager, drawZoomBox, ensureHighlightMenuOpen, removeExplodeFilter, removeThresholdFilter, resetCamera, resetExplodeFilter, resetShrinkFilter, resetThresholdFilter, restoreCameraPosition, rotateCamera, saveCameraPosition, selectCameraOrientation, selectShrinkDatasets, selectThresholdBlockPolyhedron, selectThresholdCardAttribute, selectThresholdCellAttribute, selectThresholdSurfacePolygon, setExplodeFactor, setRulerPointInput, setShrinkFactor, setThresholdMinimum, setZScaling, toggleCameraManager, toggleCameraOrientation, toggleCenterOnClick, toggleExplodeFilter, toggleGridScale, toggleRuler, toggleRulerSnap, toggleShrinkFilter, toggleShrinkTargetAllVisible, toggleThresholdFilter };
@@ -0,0 +1,43 @@
1
+ import { waitForActionSettled } from "./wait_for_action_settled.js";
2
+ import { closeAllMenus, moveMouseOutOfTheWay } from "./app_interaction.js";
3
+ import { dragElement } from "./viewer_canvas.js";
4
+ import "./viewer_interaction.js";
5
+ import { expect } from "@playwright/test";
6
+ //#region tests/e2e/utils/camera_tools.ts
7
+ async function toggleRuler(window) {
8
+ await closeAllMenus(window);
9
+ await window.getByTestId("rulerButton").click();
10
+ await waitForActionSettled(window);
11
+ }
12
+ async function toggleRulerSnap(window) {
13
+ await window.getByTestId("rulerSnapToggle").getByRole("checkbox").click();
14
+ await waitForActionSettled(window);
15
+ }
16
+ async function setRulerPointInput(window, pointIndex, coords) {
17
+ const card = window.getByTestId("rulerPointCard").nth(pointIndex - 1);
18
+ for (let axis = 0; axis < coords.length; axis += 1) await card.getByTestId("rulerPointCoordInput").nth(axis).locator("input").fill(coords[axis].toString());
19
+ await window.getByTestId("rulerApplyButton").click();
20
+ await waitForActionSettled(window);
21
+ }
22
+ async function clearRuler(window) {
23
+ await window.getByTestId("rulerClearButton").click();
24
+ await waitForActionSettled(window);
25
+ }
26
+ async function activateZoomToBox(window) {
27
+ await closeAllMenus(window);
28
+ await window.getByTestId("zoomToBoxButton").click();
29
+ await waitForActionSettled(window);
30
+ await expect(window.getByTestId("zoomBoxActiveChip")).toBeVisible();
31
+ }
32
+ async function drawZoomBox(window, deltaX, deltaY) {
33
+ const overlay = window.getByTestId("zoomBoxOverlay");
34
+ await dragElement(window, overlay, {
35
+ deltaX,
36
+ deltaY
37
+ });
38
+ await moveMouseOutOfTheWay(window);
39
+ await waitForActionSettled(window);
40
+ await expect(window.getByTestId("zoomBoxActiveChip")).toBeHidden();
41
+ }
42
+ //#endregion
43
+ export { activateZoomToBox, clearRuler, drawZoomBox, setRulerPointInput, toggleRuler, toggleRulerSnap };
@@ -1,5 +1,6 @@
1
1
  import { waitForActionSettled } from "./wait_for_action_settled.js";
2
- import { getHybridViewerCanvas } from "./viewer_interaction.js";
2
+ import { getHybridViewerCanvas } from "./viewer_canvas.js";
3
+ import "./viewer_interaction.js";
3
4
  //#region tests/e2e/utils/create_objects.ts
4
5
  function getCreateToolsPanelButton(window) {
5
6
  return window.getByTestId("createToolsPanel");
@@ -0,0 +1,47 @@
1
+ import { brepGeodeObjectType, edgedCurveGeodeObjectType, pointSetGeodeObjectType } from "./constants.js";
2
+ import { waitForActionSettled } from "./wait_for_action_settled.js";
3
+ import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "./app_interaction.js";
4
+ import { clickAssign, confirmConvert, expectRowCrs, fillAlignPoints, openCrsByButton, selectAlignmentCrs, selectAssignMode, selectConvertMode, selectCrs, selectScope } from "./crs.js";
5
+ import { navigateToDataManagerPage } from "./navigate.js";
6
+ //#region tests/e2e/utils/crs_flows.ts
7
+ async function closeCrsDialog(window) {
8
+ await window.keyboard.press("Escape");
9
+ await moveMouseOutOfTheWay(window);
10
+ }
11
+ async function expectEveryRowCrs(window, expected) {
12
+ await expectRowCrs(window, pointSetGeodeObjectType, expected);
13
+ await expectRowCrs(window, brepGeodeObjectType, expected);
14
+ await expectRowCrs(window, edgedCurveGeodeObjectType, expected);
15
+ }
16
+ async function fillAlignment(window, source, target, crsName) {
17
+ await fillAlignPoints(window, "crsAlignSource", source);
18
+ await fillAlignPoints(window, "crsAlignTarget", target);
19
+ await selectAlignmentCrs(window, crsName);
20
+ }
21
+ async function convertAloneTo(window, geodeObjectType, crsName) {
22
+ await navigateToDataManagerPage(window);
23
+ await openCrsByButton(window, geodeObjectType);
24
+ await selectConvertMode(window);
25
+ await selectScope(window, "one");
26
+ await selectCrs(window, crsName);
27
+ await confirmConvert(window);
28
+ await moveMouseOutOfTheWay(window);
29
+ }
30
+ async function startMisfitAssign(window, geodeObjectType, crsName) {
31
+ await openCrsByButton(window, geodeObjectType);
32
+ await selectAssignMode(window);
33
+ await selectCrs(window, crsName);
34
+ await clickAssign(window);
35
+ }
36
+ async function assignAnywayToAll(window, crsName) {
37
+ await selectAssignMode(window);
38
+ await selectScope(window, "all");
39
+ await selectCrs(window, crsName);
40
+ await clickAssign(window);
41
+ await window.getByTestId("crsAssignAnyway").click();
42
+ await waitForActionSettled(window);
43
+ await closeFeedbackSnackbar(window);
44
+ await moveMouseOutOfTheWay(window);
45
+ }
46
+ //#endregion
47
+ export { assignAnywayToAll, closeCrsDialog, convertAloneTo, expectEveryRowCrs, fillAlignment, startMisfitAssign };
@@ -0,0 +1,39 @@
1
+ //#region tests/e2e/utils/crs_test_data.ts
2
+ const BREP_FILE = "test.og_brep";
3
+ const POINTSET_FILE = "test.og_pts3d";
4
+ const CURVE_FILE = "test.og_edc3d";
5
+ const POINTSET_NAME = "test";
6
+ const BREP_NAME = "test";
7
+ const LAMBERT_93 = "RGF93 v1 / Lambert-93";
8
+ const UTM_31N = "WGS 84 / UTM zone 31N";
9
+ const CC42 = "RGF93 v1 / CC42";
10
+ const ALIGN_SOURCE = [
11
+ {
12
+ x: 0,
13
+ y: 0
14
+ },
15
+ {
16
+ x: 1,
17
+ y: 0
18
+ },
19
+ {
20
+ x: 0,
21
+ y: 1
22
+ }
23
+ ];
24
+ const ALIGN_TARGET = [
25
+ {
26
+ x: 7e5,
27
+ y: 66e5
28
+ },
29
+ {
30
+ x: 700010,
31
+ y: 66e5
32
+ },
33
+ {
34
+ x: 7e5,
35
+ y: 6600010
36
+ }
37
+ ];
38
+ //#endregion
39
+ export { ALIGN_SOURCE, ALIGN_TARGET, BREP_FILE, BREP_NAME, CC42, CURVE_FILE, LAMBERT_93, POINTSET_FILE, POINTSET_NAME, UTM_31N };
@@ -1,18 +1,10 @@
1
1
  import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
2
  import { moveMouseOutOfTheWay } from "../../app_interaction.js";
3
- import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_interaction.js";
4
- import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "./color_picker.js";
3
+ import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_menu.js";
4
+ import "../../viewer_interaction.js";
5
+ import { getMenuContainer, resetMenuScroll } from "./attribute_menu.js";
6
+ import { setFeatureColorMap, setFeatureNoDataColor, setQuickColorMap } from "./attribute_colors.js";
5
7
  //#region tests/e2e/utils/data/helpers/attribute.ts
6
- async function resetMenuScroll(window, scrollTop = 0) {
7
- await window.evaluate((top) => {
8
- const cardTexts = document.querySelectorAll(".v-card-text");
9
- for (const cardTextElement of cardTexts) cardTextElement.scrollTop = top;
10
- }, scrollTop);
11
- }
12
- function getMenuContainer(window, menuTestId) {
13
- if (typeof menuTestId === "string") return window.getByTestId(menuTestId);
14
- return menuTestId;
15
- }
16
8
  async function setFeatureItem(window, menuTestId, item) {
17
9
  const itemSelector = getMenuContainer(window, menuTestId).getByTestId("itemSelector").first();
18
10
  await itemSelector.waitFor({ state: "visible" });
@@ -27,20 +19,6 @@ async function setFeatureItem(window, menuTestId, item) {
27
19
  await resetMenuScroll(window, 0);
28
20
  await moveMouseOutOfTheWay(window);
29
21
  }
30
- async function setFeatureColorMap(window, menuTestId, colorMap) {
31
- const colorMapPicker = getMenuContainer(window, menuTestId).getByTestId("colorMapPicker").first();
32
- await colorMapPicker.waitFor({ state: "visible" });
33
- await colorMapPicker.click();
34
- await waitForActionSettled(window);
35
- await window.getByTestId("colorMapListFilter").filter({ visible: true }).first().locator("input").fill(colorMap);
36
- await window.getByTestId("colorMapListLoading").waitFor({ state: "detached" });
37
- await waitForActionSettled(window);
38
- await window.getByTestId("colorMapList").getByText(colorMap, { exact: true }).filter({ visible: true }).first().click();
39
- await waitForActionSettled(window);
40
- await resetMenuScroll(window, 0);
41
- await moveMouseOutOfTheWay(window);
42
- await waitForActionSettled(window);
43
- }
44
22
  async function applyAttribute(window, menuTestId, { attributeType, attributeName, item, colorMap, min, max }) {
45
23
  if (typeof menuTestId === "string") {
46
24
  await ensureMenuOpen(window, menuTestId);
@@ -90,30 +68,6 @@ async function setFeatureAttribute(window, viewerObjectType, feature, attributeT
90
68
  ...options
91
69
  });
92
70
  }
93
- async function setQuickColorMap(window, colorMap) {
94
- const colorMapListFilter = window.getByTestId("colorMapListFilter").filter({ visible: true }).first();
95
- await colorMapListFilter.locator("input").waitFor({ state: "visible" });
96
- await colorMapListFilter.locator("input").fill(colorMap);
97
- await window.getByTestId("colorMapListLoading").waitFor({ state: "detached" });
98
- await waitForActionSettled(window);
99
- await window.getByTestId("colorMapList").getByText(colorMap, { exact: true }).filter({ visible: true }).first().click();
100
- await waitForActionSettled(window);
101
- await moveMouseOutOfTheWay(window);
102
- }
103
- async function setFeatureNoDataColor(window, menuTestId) {
104
- if (typeof menuTestId === "string") await ensureMenuOpen(window, menuTestId);
105
- const noDataColorBtn = getMenuContainer(window, menuTestId).getByTestId("noDataColorBtn").first();
106
- await noDataColorBtn.waitFor({ state: "visible" });
107
- await noDataColorBtn.click();
108
- await waitForActionSettled(window);
109
- await window.getByTestId("colorPicker").filter({ visible: true }).first().waitFor({ state: "visible" });
110
- await clickColorPickerSlider(window, SLIDER_PINK);
111
- await clickColorPickerCanvas(window);
112
- await noDataColorBtn.click();
113
- await resetMenuScroll(window, 0);
114
- await moveMouseOutOfTheWay(window);
115
- await waitForActionSettled(window);
116
- }
117
71
  async function setFeatureTimeStep(window, menuTestId, timeStep) {
118
72
  if (typeof menuTestId === "string") await ensureMenuOpen(window, menuTestId);
119
73
  const sliderThumb = getMenuContainer(window, menuTestId).getByTestId("timeStepSlider").first().getByRole("slider");
@@ -0,0 +1,47 @@
1
+ import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
+ import { moveMouseOutOfTheWay } from "../../app_interaction.js";
3
+ import { ensureMenuOpen } from "../../viewer_menu.js";
4
+ import "../../viewer_interaction.js";
5
+ import { getMenuContainer, resetMenuScroll } from "./attribute_menu.js";
6
+ import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "./color_picker.js";
7
+ //#region tests/e2e/utils/data/helpers/attribute_colors.ts
8
+ async function setFeatureColorMap(window, menuTestId, colorMap) {
9
+ const colorMapPicker = getMenuContainer(window, menuTestId).getByTestId("colorMapPicker").first();
10
+ await colorMapPicker.waitFor({ state: "visible" });
11
+ await colorMapPicker.click();
12
+ await waitForActionSettled(window);
13
+ await window.getByTestId("colorMapListFilter").filter({ visible: true }).first().locator("input").fill(colorMap);
14
+ await window.getByTestId("colorMapListLoading").waitFor({ state: "detached" });
15
+ await waitForActionSettled(window);
16
+ await window.getByTestId("colorMapList").getByText(colorMap, { exact: true }).filter({ visible: true }).first().click();
17
+ await waitForActionSettled(window);
18
+ await resetMenuScroll(window, 0);
19
+ await moveMouseOutOfTheWay(window);
20
+ await waitForActionSettled(window);
21
+ }
22
+ async function setQuickColorMap(window, colorMap) {
23
+ const colorMapListFilter = window.getByTestId("colorMapListFilter").filter({ visible: true }).first();
24
+ await colorMapListFilter.locator("input").waitFor({ state: "visible" });
25
+ await colorMapListFilter.locator("input").fill(colorMap);
26
+ await window.getByTestId("colorMapListLoading").waitFor({ state: "detached" });
27
+ await waitForActionSettled(window);
28
+ await window.getByTestId("colorMapList").getByText(colorMap, { exact: true }).filter({ visible: true }).first().click();
29
+ await waitForActionSettled(window);
30
+ await moveMouseOutOfTheWay(window);
31
+ }
32
+ async function setFeatureNoDataColor(window, menuTestId) {
33
+ if (typeof menuTestId === "string") await ensureMenuOpen(window, menuTestId);
34
+ const noDataColorBtn = getMenuContainer(window, menuTestId).getByTestId("noDataColorBtn").first();
35
+ await noDataColorBtn.waitFor({ state: "visible" });
36
+ await noDataColorBtn.click();
37
+ await waitForActionSettled(window);
38
+ await window.getByTestId("colorPicker").filter({ visible: true }).first().waitFor({ state: "visible" });
39
+ await clickColorPickerSlider(window, SLIDER_PINK);
40
+ await clickColorPickerCanvas(window);
41
+ await noDataColorBtn.click();
42
+ await resetMenuScroll(window, 0);
43
+ await moveMouseOutOfTheWay(window);
44
+ await waitForActionSettled(window);
45
+ }
46
+ //#endregion
47
+ export { setFeatureColorMap, setFeatureNoDataColor, setQuickColorMap };
@@ -0,0 +1,13 @@
1
+ //#region tests/e2e/utils/data/helpers/attribute_menu.ts
2
+ async function resetMenuScroll(window, scrollTop = 0) {
3
+ await window.evaluate((top) => {
4
+ const cardTexts = document.querySelectorAll(".v-card-text");
5
+ for (const cardTextElement of cardTexts) cardTextElement.scrollTop = top;
6
+ }, scrollTop);
7
+ }
8
+ function getMenuContainer(window, menuTestId) {
9
+ if (typeof menuTestId === "string") return window.getByTestId(menuTestId);
10
+ return menuTestId;
11
+ }
12
+ //#endregion
13
+ export { getMenuContainer, resetMenuScroll };
@@ -1,6 +1,7 @@
1
1
  import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
2
  import { moveMouseOutOfTheWay } from "../../app_interaction.js";
3
- import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_interaction.js";
3
+ import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_menu.js";
4
+ import "../../viewer_interaction.js";
4
5
  import { clickColorPickerCanvas, clickColorPickerSlider, clickCopyColorBtn, pasteColorInputText, setColorInputText } from "./color_picker.js";
5
6
  //#region tests/e2e/utils/data/helpers/color.ts
6
7
  async function setColoringStyle(window, menuTestId, coloringStyle, container = window) {
@@ -1,5 +1,6 @@
1
1
  import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
- import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_interaction.js";
2
+ import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_menu.js";
3
+ import "../../viewer_interaction.js";
3
4
  //#region tests/e2e/utils/data/helpers/textures.ts
4
5
  async function selectOverlayListItem(window, text) {
5
6
  await window.locator(".v-overlay-container").locator(".v-list-item").filter({
@@ -1,9 +1,11 @@
1
1
  import { cellAttributeType, cellsFeatureName, meshViewerObjectType, vertexAttributeType } from "../../../constants.js";
2
2
  import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
3
  import { moveMouseOutOfTheWay } from "../../../app_interaction.js";
4
- import { ensureMenuOpen, openStyleMenu } from "../../../viewer_interaction.js";
4
+ import { ensureMenuOpen, openStyleMenu } from "../../../viewer_menu.js";
5
+ import "../../../viewer_interaction.js";
5
6
  import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "../../helpers/color_picker.js";
6
- import { setFeatureAttribute, setFeatureColorMap, setFeatureItem } from "../../helpers/attribute.js";
7
+ import { setFeatureColorMap } from "../../helpers/attribute_colors.js";
8
+ import { setFeatureAttribute, setFeatureItem } from "../../helpers/attribute.js";
7
9
  //#region tests/e2e/utils/data/mesh/cells/attribute.ts
8
10
  async function setMeshCellsVertexAttribute(window, attributeName, options = {}) {
9
11
  await setFeatureAttribute(window, meshViewerObjectType, cellsFeatureName, vertexAttributeType, attributeName, options);
@@ -1,5 +1,6 @@
1
1
  import { meshViewerObjectType } from "../../../constants.js";
2
- import { setCellsVisibility } from "../../../viewer_interaction.js";
2
+ import { setCellsVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
3
4
  //#region tests/e2e/utils/data/mesh/cells/visibility.ts
4
5
  async function setMeshCellsVisibility(window, visibility) {
5
6
  await setCellsVisibility(window, meshViewerObjectType, visibility);
@@ -1,9 +1,11 @@
1
1
  import { edgeAttributeType, edgesFeatureName, meshViewerObjectType, vertexAttributeType } from "../../../constants.js";
2
2
  import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
3
  import { moveMouseOutOfTheWay } from "../../../app_interaction.js";
4
- import { ensureMenuOpen, openStyleMenu } from "../../../viewer_interaction.js";
4
+ import { ensureMenuOpen, openStyleMenu } from "../../../viewer_menu.js";
5
+ import "../../../viewer_interaction.js";
5
6
  import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "../../helpers/color_picker.js";
6
- import { setFeatureAttribute, setFeatureColorMap, setFeatureItem } from "../../helpers/attribute.js";
7
+ import { setFeatureColorMap } from "../../helpers/attribute_colors.js";
8
+ import { setFeatureAttribute, setFeatureItem } from "../../helpers/attribute.js";
7
9
  //#region tests/e2e/utils/data/mesh/edges/attribute.ts
8
10
  async function setMeshEdgesVertexAttribute(window, attributeName, options = {}) {
9
11
  await setFeatureAttribute(window, meshViewerObjectType, edgesFeatureName, vertexAttributeType, attributeName, options);
@@ -1,5 +1,6 @@
1
1
  import { meshViewerObjectType } from "../../../constants.js";
2
- import { setEdgesVisibility } from "../../../viewer_interaction.js";
2
+ import { setEdgesVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
3
4
  //#region tests/e2e/utils/data/mesh/edges/visibility.ts
4
5
  async function setMeshEdgesVisibility(window, visibility) {
5
6
  await setEdgesVisibility(window, meshViewerObjectType, visibility);
@@ -1,5 +1,6 @@
1
1
  import { meshViewerObjectType } from "../../../constants.js";
2
- import { setEdgesWidth } from "../../../viewer_interaction.js";
2
+ import { setEdgesWidth } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
3
4
  //#region tests/e2e/utils/data/mesh/edges/width.ts
4
5
  async function setMeshEdgesWidth(window, value) {
5
6
  await setEdgesWidth(window, meshViewerObjectType, value);
@@ -1,7 +1,8 @@
1
1
  import { meshViewerObjectType, pointsFeatureName, vertexAttributeType } from "../../../constants.js";
2
2
  import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
3
  import { moveMouseOutOfTheWay } from "../../../app_interaction.js";
4
- import { ensureMenuOpen, openStyleMenu } from "../../../viewer_interaction.js";
4
+ import { ensureMenuOpen, openStyleMenu } from "../../../viewer_menu.js";
5
+ import "../../../viewer_interaction.js";
5
6
  import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "../../helpers/color_picker.js";
6
7
  import { setFeatureAttribute } from "../../helpers/attribute.js";
7
8
  //#region tests/e2e/utils/data/mesh/points/attribute.ts
@@ -1,5 +1,6 @@
1
1
  import { meshViewerObjectType } from "../../../constants.js";
2
- import { setPointsSize } from "../../../viewer_interaction.js";
2
+ import { setPointsSize } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
3
4
  //#region tests/e2e/utils/data/mesh/points/size.ts
4
5
  async function setMeshPointsSize(window, value) {
5
6
  await setPointsSize(window, meshViewerObjectType, value);
@@ -1,5 +1,6 @@
1
1
  import { meshViewerObjectType } from "../../../constants.js";
2
- import { setPointsVisibility } from "../../../viewer_interaction.js";
2
+ import { setPointsVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
3
4
  //#region tests/e2e/utils/data/mesh/points/visibility.ts
4
5
  async function setMeshPointsVisibility(window, visibility) {
5
6
  await setPointsVisibility(window, meshViewerObjectType, visibility);