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.
Files changed (137) hide show
  1. package/.build/tests/e2e/utils/create_objects.js +2 -3
  2. package/.build/tests/e2e/utils/crs.js +4 -4
  3. package/.build/tests/e2e/utils/crs_flows.js +3 -3
  4. package/.build/tests/e2e/utils/data_manager.js +2 -2
  5. package/.build/tests/e2e/utils/extension.js +2 -2
  6. package/.build/tests/e2e/utils/fixtures.js +1 -1
  7. package/.build/tests/e2e/utils/load.js +1 -1
  8. package/.build/tests/e2e/utils/project_interaction.js +2 -2
  9. package/package.json +4 -1
  10. package/tests/e2e/utils/create_objects.ts +2 -2
  11. package/tests/e2e/utils/crs.ts +7 -4
  12. package/tests/e2e/utils/crs_flows.ts +3 -3
  13. package/tests/e2e/utils/data_manager.ts +2 -2
  14. package/tests/e2e/utils/extension.ts +2 -2
  15. package/tests/e2e/utils/fixtures.ts +1 -1
  16. package/tests/e2e/utils/load.ts +1 -1
  17. package/tests/e2e/utils/project_interaction.ts +2 -2
  18. package/.build/tests/e2e/utils/app_interaction.js +0 -24
  19. package/.build/tests/e2e/utils/basemap.js +0 -55
  20. package/.build/tests/e2e/utils/camera_filters.js +0 -105
  21. package/.build/tests/e2e/utils/camera_interaction.js +0 -107
  22. package/.build/tests/e2e/utils/camera_tools.js +0 -43
  23. package/.build/tests/e2e/utils/clipping_planes_interaction.js +0 -80
  24. package/.build/tests/e2e/utils/constants.js +0 -43
  25. package/.build/tests/e2e/utils/data/constants.js +0 -26
  26. package/.build/tests/e2e/utils/data/helpers/attribute.js +0 -85
  27. package/.build/tests/e2e/utils/data/helpers/attribute_colors.js +0 -47
  28. package/.build/tests/e2e/utils/data/helpers/attribute_menu.js +0 -13
  29. package/.build/tests/e2e/utils/data/helpers/color.js +0 -98
  30. package/.build/tests/e2e/utils/data/helpers/color_picker.js +0 -52
  31. package/.build/tests/e2e/utils/data/helpers/textures.js +0 -26
  32. package/.build/tests/e2e/utils/data/index.js +0 -28
  33. package/.build/tests/e2e/utils/data/mesh/cells/attribute.js +0 -43
  34. package/.build/tests/e2e/utils/data/mesh/cells/color.js +0 -26
  35. package/.build/tests/e2e/utils/data/mesh/cells/index.js +0 -4
  36. package/.build/tests/e2e/utils/data/mesh/cells/visibility.js +0 -9
  37. package/.build/tests/e2e/utils/data/mesh/edges/attribute.js +0 -43
  38. package/.build/tests/e2e/utils/data/mesh/edges/color.js +0 -26
  39. package/.build/tests/e2e/utils/data/mesh/edges/index.js +0 -5
  40. package/.build/tests/e2e/utils/data/mesh/edges/visibility.js +0 -9
  41. package/.build/tests/e2e/utils/data/mesh/edges/width.js +0 -9
  42. package/.build/tests/e2e/utils/data/mesh/index.js +0 -24
  43. package/.build/tests/e2e/utils/data/mesh/points/attribute.js +0 -31
  44. package/.build/tests/e2e/utils/data/mesh/points/color.js +0 -26
  45. package/.build/tests/e2e/utils/data/mesh/points/index.js +0 -5
  46. package/.build/tests/e2e/utils/data/mesh/points/size.js +0 -9
  47. package/.build/tests/e2e/utils/data/mesh/points/visibility.js +0 -9
  48. package/.build/tests/e2e/utils/data/mesh/polygon/attribute.js +0 -47
  49. package/.build/tests/e2e/utils/data/mesh/polygon/color.js +0 -26
  50. package/.build/tests/e2e/utils/data/mesh/polygon/index.js +0 -5
  51. package/.build/tests/e2e/utils/data/mesh/polygon/textures.js +0 -14
  52. package/.build/tests/e2e/utils/data/mesh/polygon/visibility.js +0 -9
  53. package/.build/tests/e2e/utils/data/mesh/polyhedra/attribute.js +0 -43
  54. package/.build/tests/e2e/utils/data/mesh/polyhedra/color.js +0 -29
  55. package/.build/tests/e2e/utils/data/mesh/polyhedra/index.js +0 -4
  56. package/.build/tests/e2e/utils/data/mesh/polyhedra/visibility.js +0 -9
  57. package/.build/tests/e2e/utils/data/model/attribute.js +0 -99
  58. package/.build/tests/e2e/utils/data/model/color.js +0 -69
  59. package/.build/tests/e2e/utils/data/model/edges/components.js +0 -50
  60. package/.build/tests/e2e/utils/data/model/edges/index.js +0 -3
  61. package/.build/tests/e2e/utils/data/model/edges/visibility.js +0 -9
  62. package/.build/tests/e2e/utils/data/model/index.js +0 -11
  63. package/.build/tests/e2e/utils/data/model/points/components.js +0 -50
  64. package/.build/tests/e2e/utils/data/model/points/index.js +0 -3
  65. package/.build/tests/e2e/utils/data/model/points/visibility.js +0 -9
  66. package/.build/tests/e2e/utils/data/model/style_menu.js +0 -10
  67. package/.build/tests/e2e/utils/data/model/surfaces/index.js +0 -2
  68. package/.build/tests/e2e/utils/data/model/surfaces/visibility.js +0 -8
  69. package/.build/tests/e2e/utils/model_tabs.js +0 -35
  70. package/.build/tests/e2e/utils/object_trees/common.js +0 -122
  71. package/.build/tests/e2e/utils/object_trees/main_object_tree.js +0 -86
  72. package/.build/tests/e2e/utils/object_trees/model_components_object_tree.js +0 -111
  73. package/.build/tests/e2e/utils/other.js +0 -13
  74. package/.build/tests/e2e/utils/viewer_canvas.js +0 -83
  75. package/.build/tests/e2e/utils/viewer_interaction.js +0 -87
  76. package/.build/tests/e2e/utils/viewer_menu.js +0 -98
  77. package/.build/tests/e2e/utils/wait_for_action_settled.js +0 -63
  78. package/tests/e2e/utils/app_interaction.ts +0 -35
  79. package/tests/e2e/utils/basemap.ts +0 -89
  80. package/tests/e2e/utils/camera_filters.ts +0 -176
  81. package/tests/e2e/utils/camera_interaction.ts +0 -179
  82. package/tests/e2e/utils/camera_tools.ts +0 -62
  83. package/tests/e2e/utils/clipping_planes_interaction.ts +0 -126
  84. package/tests/e2e/utils/constants.ts +0 -100
  85. package/tests/e2e/utils/data/constants.ts +0 -58
  86. package/tests/e2e/utils/data/helpers/attribute.ts +0 -156
  87. package/tests/e2e/utils/data/helpers/attribute_colors.ts +0 -83
  88. package/tests/e2e/utils/data/helpers/attribute_menu.ts +0 -19
  89. package/tests/e2e/utils/data/helpers/color.ts +0 -214
  90. package/tests/e2e/utils/data/helpers/color_picker.ts +0 -82
  91. package/tests/e2e/utils/data/helpers/textures.ts +0 -41
  92. package/tests/e2e/utils/data/index.ts +0 -2
  93. package/tests/e2e/utils/data/mesh/cells/attribute.ts +0 -103
  94. package/tests/e2e/utils/data/mesh/cells/color.ts +0 -52
  95. package/tests/e2e/utils/data/mesh/cells/index.ts +0 -3
  96. package/tests/e2e/utils/data/mesh/cells/visibility.ts +0 -9
  97. package/tests/e2e/utils/data/mesh/edges/attribute.ts +0 -103
  98. package/tests/e2e/utils/data/mesh/edges/color.ts +0 -52
  99. package/tests/e2e/utils/data/mesh/edges/index.ts +0 -4
  100. package/tests/e2e/utils/data/mesh/edges/visibility.ts +0 -9
  101. package/tests/e2e/utils/data/mesh/edges/width.ts +0 -9
  102. package/tests/e2e/utils/data/mesh/index.ts +0 -6
  103. package/tests/e2e/utils/data/mesh/points/attribute.ts +0 -66
  104. package/tests/e2e/utils/data/mesh/points/color.ts +0 -52
  105. package/tests/e2e/utils/data/mesh/points/index.ts +0 -4
  106. package/tests/e2e/utils/data/mesh/points/size.ts +0 -9
  107. package/tests/e2e/utils/data/mesh/points/visibility.ts +0 -9
  108. package/tests/e2e/utils/data/mesh/polygon/attribute.ts +0 -110
  109. package/tests/e2e/utils/data/mesh/polygon/color.ts +0 -52
  110. package/tests/e2e/utils/data/mesh/polygon/index.ts +0 -4
  111. package/tests/e2e/utils/data/mesh/polygon/textures.ts +0 -21
  112. package/tests/e2e/utils/data/mesh/polygon/visibility.ts +0 -9
  113. package/tests/e2e/utils/data/mesh/polyhedra/attribute.ts +0 -103
  114. package/tests/e2e/utils/data/mesh/polyhedra/color.ts +0 -58
  115. package/tests/e2e/utils/data/mesh/polyhedra/index.ts +0 -3
  116. package/tests/e2e/utils/data/mesh/polyhedra/visibility.ts +0 -9
  117. package/tests/e2e/utils/data/model/attribute.ts +0 -180
  118. package/tests/e2e/utils/data/model/color.ts +0 -110
  119. package/tests/e2e/utils/data/model/edges/components.ts +0 -97
  120. package/tests/e2e/utils/data/model/edges/index.ts +0 -2
  121. package/tests/e2e/utils/data/model/edges/visibility.ts +0 -9
  122. package/tests/e2e/utils/data/model/index.ts +0 -5
  123. package/tests/e2e/utils/data/model/points/components.ts +0 -97
  124. package/tests/e2e/utils/data/model/points/index.ts +0 -2
  125. package/tests/e2e/utils/data/model/points/visibility.ts +0 -9
  126. package/tests/e2e/utils/data/model/style_menu.ts +0 -11
  127. package/tests/e2e/utils/data/model/surfaces/index.ts +0 -1
  128. package/tests/e2e/utils/data/model/surfaces/visibility.ts +0 -8
  129. package/tests/e2e/utils/model_tabs.ts +0 -61
  130. package/tests/e2e/utils/object_trees/common.ts +0 -212
  131. package/tests/e2e/utils/object_trees/main_object_tree.ts +0 -167
  132. package/tests/e2e/utils/object_trees/model_components_object_tree.ts +0 -219
  133. package/tests/e2e/utils/other.ts +0 -15
  134. package/tests/e2e/utils/viewer_canvas.ts +0 -136
  135. package/tests/e2e/utils/viewer_interaction.ts +0 -96
  136. package/tests/e2e/utils/viewer_menu.ts +0 -205
  137. package/tests/e2e/utils/wait_for_action_settled.ts +0 -108
@@ -1,43 +0,0 @@
1
- import { isWindows } from "std-env";
2
- //#region tests/e2e/utils/constants.ts
3
- const MILLISECONDS = 1e3;
4
- const WAIT_TIMES = {
5
- browser: (isWindows ? 25 : 20) * MILLISECONDS,
6
- cloud: 65 * MILLISECONDS,
7
- desktop: (isWindows ? 30 : 25) * MILLISECONDS
8
- };
9
- const beforeAllTimeout = 18e4;
10
- const afterActionWait = 1500;
11
- const halfSecondWait = 500;
12
- const modalTransitionWait = 2e3;
13
- const staggerMaxWait = 2e3;
14
- const defaultTimeout = 6e4;
15
- const treeWaitTimeout = 6e4;
16
- const randomMultiplier = 1e3;
17
- const PAGE_WIDTH = 1200;
18
- const PAGE_HEIGHT = 800;
19
- const meshViewerObjectType = "mesh";
20
- const modelViewerObjectType = "model";
21
- const pointSetGeodeObjectType = "PointSet3D";
22
- const edgedCurveGeodeObjectType = "EdgedCurve3D";
23
- const rgd2dGeodeObjectType = "RegularGrid2D";
24
- const rgd3dGeodeObjectType = "RegularGrid3D";
25
- const polygonalSurfaceGeodeObjectType = "PolygonalSurface3D";
26
- const hybridSolidGeodeObjectType = "HybridSolid3D";
27
- const tetrahedralSolidGeodeObjectType = "TetrahedralSolid3D";
28
- const triangulatedSurfaceGeodeObjectType = "TriangulatedSurface3D";
29
- const brepGeodeObjectType = "BRep";
30
- const structuralModelGeodeObjectType = "StructuralModel";
31
- const defaultDataName = "test";
32
- const cellsFeatureName = "Cells";
33
- const edgesFeatureName = "Edges";
34
- const pointsFeatureName = "Points";
35
- const polygonsFeatureName = "Polygons";
36
- const polyhedraFeatureName = "Polyhedra";
37
- const vertexAttributeType = "Vertex attribute";
38
- const edgeAttributeType = "Edge attribute";
39
- const polygonAttributeType = "Polygon attribute";
40
- const polyhedronAttributeType = "Polyhedron attribute";
41
- const cellAttributeType = "Cell attribute";
42
- //#endregion
43
- export { PAGE_HEIGHT, PAGE_WIDTH, WAIT_TIMES, afterActionWait, beforeAllTimeout, brepGeodeObjectType, cellAttributeType, cellsFeatureName, defaultDataName, defaultTimeout, edgeAttributeType, edgedCurveGeodeObjectType, edgesFeatureName, halfSecondWait, hybridSolidGeodeObjectType, meshViewerObjectType, modalTransitionWait, modelViewerObjectType, pointSetGeodeObjectType, pointsFeatureName, polygonAttributeType, polygonalSurfaceGeodeObjectType, polygonsFeatureName, polyhedraFeatureName, polyhedronAttributeType, randomMultiplier, rgd2dGeodeObjectType, rgd3dGeodeObjectType, staggerMaxWait, structuralModelGeodeObjectType, tetrahedralSolidGeodeObjectType, treeWaitTimeout, triangulatedSurfaceGeodeObjectType, vertexAttributeType };
@@ -1,26 +0,0 @@
1
- //#region tests/e2e/utils/data/constants.ts
2
- const meshViewerObjectType = "mesh";
3
- const modelViewerObjectType = "model";
4
- const pointSetGeodeObjectType = "PointSet3D";
5
- const edgedCurveGeodeObjectType = "EdgedCurve3D";
6
- const rgd2dGeodeObjectType = "RegularGrid2D";
7
- const rgd3dGeodeObjectType = "RegularGrid3D";
8
- const polygonalSurfaceGeodeObjectType = "PolygonalSurface3D";
9
- const hybridSolidGeodeObjectType = "HybridSolid3D";
10
- const tetrahedralSolidGeodeObjectType = "TetrahedralSolid3D";
11
- const triangulatedSurfaceGeodeObjectType = "TriangulatedSurface3D";
12
- const brepGeodeObjectType = "BRep";
13
- const structuralModelGeodeObjectType = "StructuralModel";
14
- const defaultDataName = "test";
15
- const cellsFeatureName = "Cells";
16
- const edgesFeatureName = "Edges";
17
- const pointsFeatureName = "Points";
18
- const polygonsFeatureName = "Polygons";
19
- const polyhedraFeatureName = "Polyhedra";
20
- const vertexAttributeType = "Vertex attribute";
21
- const edgeAttributeType = "Edge attribute";
22
- const polygonAttributeType = "Polygon attribute";
23
- const polyhedronAttributeType = "Polyhedron attribute";
24
- const cellAttributeType = "Cell attribute";
25
- //#endregion
26
- export { brepGeodeObjectType, cellAttributeType, cellsFeatureName, defaultDataName, edgeAttributeType, edgedCurveGeodeObjectType, edgesFeatureName, hybridSolidGeodeObjectType, meshViewerObjectType, modelViewerObjectType, pointSetGeodeObjectType, pointsFeatureName, polygonAttributeType, polygonalSurfaceGeodeObjectType, polygonsFeatureName, polyhedraFeatureName, polyhedronAttributeType, rgd2dGeodeObjectType, rgd3dGeodeObjectType, structuralModelGeodeObjectType, tetrahedralSolidGeodeObjectType, triangulatedSurfaceGeodeObjectType, vertexAttributeType };
@@ -1,85 +0,0 @@
1
- import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
- import { moveMouseOutOfTheWay } from "../../app_interaction.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";
7
- //#region tests/e2e/utils/data/helpers/attribute.ts
8
- async function setFeatureItem(window, menuTestId, item) {
9
- const itemSelector = getMenuContainer(window, menuTestId).getByTestId("itemSelector").first();
10
- await itemSelector.waitFor({ state: "visible" });
11
- await itemSelector.click();
12
- await waitForActionSettled(window);
13
- const itemText = `Item ${item + 1}`;
14
- await window.locator(".v-overlay-container").locator(".v-list-item").filter({
15
- hasText: itemText,
16
- visible: true
17
- }).first().click();
18
- await waitForActionSettled(window);
19
- await resetMenuScroll(window, 0);
20
- await moveMouseOutOfTheWay(window);
21
- }
22
- async function applyAttribute(window, menuTestId, { attributeType, attributeName, item, colorMap, min, max }) {
23
- if (typeof menuTestId === "string") {
24
- await ensureMenuOpen(window, menuTestId);
25
- await ensureFeatureVisible(window, menuTestId);
26
- }
27
- const container = getMenuContainer(window, menuTestId);
28
- await container.getByTestId("coloringStyleSelector").first().click();
29
- await waitForActionSettled(window);
30
- await window.locator(".v-overlay-container").locator(".v-list-item").filter({
31
- hasText: attributeType,
32
- visible: true
33
- }).first().click();
34
- await waitForActionSettled(window);
35
- const attributeSelector = container.getByTestId("attributeSelector").first();
36
- await attributeSelector.waitFor({ state: "visible" });
37
- await attributeSelector.click();
38
- await waitForActionSettled(window);
39
- await window.locator(".v-overlay-container").locator(".v-list-item").filter({
40
- hasText: attributeName,
41
- visible: true
42
- }).first().click();
43
- await waitForActionSettled(window);
44
- if (item !== void 0) await setFeatureItem(window, menuTestId, item);
45
- if (colorMap !== void 0 && colorMap !== "") await setFeatureColorMap(window, menuTestId, colorMap);
46
- if (min !== void 0) {
47
- const input = container.getByTestId("attributeMinInput").first().locator("input");
48
- await input.fill(min.toString());
49
- await input.press("Enter");
50
- await waitForActionSettled(window);
51
- }
52
- if (max !== void 0) {
53
- const input = container.getByTestId("attributeMaxInput").first().locator("input");
54
- await input.fill(max.toString());
55
- await input.press("Enter");
56
- await waitForActionSettled(window);
57
- }
58
- await resetMenuScroll(window, 0);
59
- await waitForActionSettled(window);
60
- await moveMouseOutOfTheWay(window);
61
- }
62
- async function setFeatureAttribute(window, viewerObjectType, feature, attributeType, attributeName, options = {}) {
63
- let menuTestId = `${viewerObjectType}${feature}Menu`;
64
- if (viewerObjectType === "model") menuTestId = "modelStyleMenu";
65
- await applyAttribute(window, menuTestId, {
66
- attributeType,
67
- attributeName,
68
- ...options
69
- });
70
- }
71
- async function setFeatureTimeStep(window, menuTestId, timeStep) {
72
- if (typeof menuTestId === "string") await ensureMenuOpen(window, menuTestId);
73
- const sliderThumb = getMenuContainer(window, menuTestId).getByTestId("timeStepSlider").first().getByRole("slider");
74
- await sliderThumb.waitFor({ state: "visible" });
75
- await sliderThumb.focus();
76
- await sliderThumb.press("Home");
77
- for (let step = 0; step < timeStep; step += 1) await sliderThumb.press("ArrowRight");
78
- await waitForActionSettled(window);
79
- await sliderThumb.blur();
80
- await resetMenuScroll(window, 0);
81
- await moveMouseOutOfTheWay(window);
82
- await waitForActionSettled(window);
83
- }
84
- //#endregion
85
- export { applyAttribute, resetMenuScroll, setFeatureAttribute, setFeatureColorMap, setFeatureItem, setFeatureNoDataColor, setFeatureTimeStep, setQuickColorMap };
@@ -1,47 +0,0 @@
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 };
@@ -1,13 +0,0 @@
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,98 +0,0 @@
1
- import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
- import { moveMouseOutOfTheWay } from "../../app_interaction.js";
3
- import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_menu.js";
4
- import "../../viewer_interaction.js";
5
- import { clickColorPickerCanvas, clickColorPickerSlider, clickCopyColorBtn, pasteColorInputText, setColorInputText } from "./color_picker.js";
6
- //#region tests/e2e/utils/data/helpers/color.ts
7
- async function setColoringStyle(window, menuTestId, coloringStyle, container = window) {
8
- await ensureMenuOpen(window, menuTestId);
9
- await ensureFeatureVisible(window, menuTestId);
10
- await container.getByTestId("coloringStyleSelector").first().click();
11
- await waitForActionSettled(window);
12
- const listItem = window.locator(".v-overlay-container").locator(".v-list-item").filter({
13
- hasText: coloringStyle,
14
- visible: true
15
- }).first();
16
- await listItem.waitFor({
17
- state: "visible",
18
- timeout: 15e3
19
- });
20
- await listItem.click();
21
- await moveMouseOutOfTheWay(window);
22
- await waitForActionSettled(window);
23
- }
24
- async function setColor(window, menuTestId, container = window) {
25
- await setColoringStyle(window, menuTestId, "Constant", container);
26
- await clickColorPickerCanvas(window, container);
27
- }
28
- async function setColorWithSlider(window, menuTestId, container = window) {
29
- await setColoringStyle(window, menuTestId, "Constant", container);
30
- await clickColorPickerSlider(window, container);
31
- await clickColorPickerCanvas(window, container);
32
- }
33
- async function setOpacity(window, menuTestId, percent) {
34
- await ensureMenuOpen(window, menuTestId);
35
- await ensureFeatureVisible(window, menuTestId);
36
- const alphaSlider = window.getByTestId(menuTestId).getByTestId("colorPicker").locator(".v-color-picker-preview__alpha, .v-color-picker__alpha").first();
37
- const box = await alphaSlider.boundingBox();
38
- if (!box) throw new Error("Could not get bounding box of the opacity slider");
39
- await alphaSlider.click({
40
- force: true,
41
- position: {
42
- x: box.width * percent / 100,
43
- y: box.height / 2
44
- }
45
- });
46
- await moveMouseOutOfTheWay(window);
47
- await waitForActionSettled(window);
48
- }
49
- const COLOR_CANVAS_OFFSET = 5;
50
- async function setColorBlack(window, menuTestId, container = window) {
51
- await setColoringStyle(window, menuTestId, "Constant", container);
52
- const canvas = container.getByTestId("colorPicker").locator(".v-color-picker-canvas").first();
53
- const box = await canvas.boundingBox();
54
- if (!box) throw new Error("Could not get bounding box of the color canvas");
55
- await canvas.click({ position: {
56
- x: COLOR_CANVAS_OFFSET,
57
- y: box.height - COLOR_CANVAS_OFFSET
58
- } });
59
- await waitForActionSettled(window);
60
- }
61
- async function copyColor(window, menuTestId, container = window) {
62
- await setColoringStyle(window, menuTestId, "Constant", container);
63
- await clickCopyColorBtn(window, container);
64
- }
65
- async function setColorInput(window, menuTestId, colorText, container = window) {
66
- await setColoringStyle(window, menuTestId, "Constant", container);
67
- await setColorInputText(window, colorText, container);
68
- }
69
- async function pasteColorInput(window, menuTestId, container = window) {
70
- await setColoringStyle(window, menuTestId, "Constant", container);
71
- await pasteColorInputText(window, container);
72
- }
73
- async function setFeatureColorBlack(window, viewerObjectType, feature, container = window) {
74
- await setColorBlack(window, `${viewerObjectType}${feature}Menu`, container);
75
- }
76
- async function setFeatureColor(window, viewerObjectType, feature, container = window) {
77
- await setColor(window, `${viewerObjectType}${feature}Menu`, container);
78
- }
79
- async function setFeatureColorWithSlider(window, viewerObjectType, feature, container = window) {
80
- await setColorWithSlider(window, `${viewerObjectType}${feature}Menu`, container);
81
- }
82
- async function setFeatureCopyColor(window, viewerObjectType, feature, container = window) {
83
- await copyColor(window, `${viewerObjectType}${feature}Menu`, container);
84
- }
85
- async function setFeatureColorInput(window, viewerObjectType, feature, colorText, container = window) {
86
- await setColorInput(window, `${viewerObjectType}${feature}Menu`, colorText, container);
87
- }
88
- async function setFeaturePasteColorInput(window, viewerObjectType, feature, container = window) {
89
- await pasteColorInput(window, `${viewerObjectType}${feature}Menu`, container);
90
- }
91
- async function setFeatureColoringStyle(window, viewerObjectType, feature, coloringStyle, container = window) {
92
- await setColoringStyle(window, `${viewerObjectType}${feature}Menu`, coloringStyle, container);
93
- }
94
- async function setFeatureOpacity(window, viewerObjectType, feature, percent) {
95
- await setOpacity(window, `${viewerObjectType}${feature}Menu`, percent);
96
- }
97
- //#endregion
98
- export { copyColor, pasteColorInput, setColor, setColorBlack, setColorInput, setColorWithSlider, setColoringStyle, setFeatureColor, setFeatureColorBlack, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput, setOpacity };
@@ -1,52 +0,0 @@
1
- import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
- import { moveMouseOutOfTheWay } from "../../app_interaction.js";
3
- //#region tests/e2e/utils/data/helpers/color_picker.ts
4
- const MAX_PERCENTAGE = 100;
5
- const SLIDER_BLUE = .7;
6
- const SLIDER_PINK = .85;
7
- async function clickColorPickerCanvas(window, container = window) {
8
- await container.getByTestId("colorPicker").locator(".v-color-picker-canvas").first().click();
9
- await moveMouseOutOfTheWay(window);
10
- await waitForActionSettled(window);
11
- }
12
- async function clickColorPickerSlider(window, container = window, percentage = SLIDER_BLUE) {
13
- const targetContainer = typeof container === "number" ? window : container;
14
- const targetPercentage = typeof container === "number" ? container : percentage;
15
- const rgbaSlider = targetContainer.getByTestId("colorPicker").locator(".v-slider").first();
16
- const rgbaBox = await rgbaSlider.boundingBox();
17
- if (!rgbaBox) throw new Error("Could not get bounding box of the color slider");
18
- await rgbaSlider.click({ position: {
19
- x: rgbaBox.width * targetPercentage,
20
- y: rgbaBox.height / 2
21
- } });
22
- await waitForActionSettled(window);
23
- }
24
- async function clickCopyColorBtn(window, container = window) {
25
- await container.getByTestId("copyColorBtn").click();
26
- await moveMouseOutOfTheWay(window);
27
- await waitForActionSettled(window);
28
- }
29
- async function setColorInputText(window, text, container = window) {
30
- const input = container.getByTestId("colorInput");
31
- await input.fill(text);
32
- await input.press("Enter");
33
- await waitForActionSettled(window);
34
- }
35
- async function pasteColorInputText(window, container = window) {
36
- const textToPaste = await window.evaluate(async () => {
37
- return await navigator.clipboard.readText();
38
- });
39
- const input = container.getByTestId("colorInput");
40
- await input.focus();
41
- await input.evaluate((inputElement, data) => {
42
- const dataTransfer = new DataTransfer();
43
- dataTransfer.setData("text/plain", data);
44
- inputElement.dispatchEvent(new ClipboardEvent("paste", {
45
- clipboardData: dataTransfer,
46
- bubbles: true
47
- }));
48
- }, textToPaste);
49
- await waitForActionSettled(window);
50
- }
51
- //#endregion
52
- export { MAX_PERCENTAGE, SLIDER_BLUE, SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider, clickCopyColorBtn, pasteColorInputText, setColorInputText };
@@ -1,26 +0,0 @@
1
- import { waitForActionSettled } from "../../wait_for_action_settled.js";
2
- import { ensureFeatureVisible, ensureMenuOpen } from "../../viewer_menu.js";
3
- import "../../viewer_interaction.js";
4
- //#region tests/e2e/utils/data/helpers/textures.ts
5
- async function selectOverlayListItem(window, text) {
6
- await window.locator(".v-overlay-container").locator(".v-list-item").filter({
7
- hasText: text,
8
- visible: true
9
- }).first().click();
10
- await waitForActionSettled(window);
11
- }
12
- async function setFeatureTextures(window, menuTestId, texture) {
13
- await ensureMenuOpen(window, menuTestId);
14
- await ensureFeatureVisible(window, menuTestId);
15
- const container = window.getByTestId(menuTestId);
16
- await container.getByTestId("coloringStyleSelector").first().click();
17
- await waitForActionSettled(window);
18
- await selectOverlayListItem(window, "Textures");
19
- await container.getByTestId("textureNameSelector").first().click();
20
- await waitForActionSettled(window);
21
- await selectOverlayListItem(window, texture.name);
22
- await container.locator("input[type=\"file\"][accept*=\"image/png\"]").first().setInputFiles(texture.filePath);
23
- await waitForActionSettled(window);
24
- }
25
- //#endregion
26
- export { setFeatureTextures };
@@ -1,28 +0,0 @@
1
- import { openMeshCellsMenu, setMeshCellsCellAttribute, setMeshCellsColorMap, setMeshCellsItem, setMeshCellsNoDataColor, setMeshCellsVertexAttribute } from "./mesh/cells/attribute.js";
2
- import { copyMeshCellsColor, pasteMeshCellsColorInput, setMeshCellsColor, setMeshCellsColorInput, setMeshCellsColorWithSlider, setMeshCellsColoringStyle, setMeshCellsOpacity } from "./mesh/cells/color.js";
3
- import { setMeshCellsVisibility } from "./mesh/cells/visibility.js";
4
- import { openMeshEdgesMenu, setMeshEdgesColorMap, setMeshEdgesEdgeAttribute, setMeshEdgesItem, setMeshEdgesNoDataColor, setMeshEdgesVertexAttribute } from "./mesh/edges/attribute.js";
5
- import { copyMeshEdgesColor, pasteMeshEdgesColorInput, setMeshEdgesColor, setMeshEdgesColorInput, setMeshEdgesColorWithSlider, setMeshEdgesColoringStyle, setMeshEdgesOpacity } from "./mesh/edges/color.js";
6
- import { setMeshEdgesVisibility } from "./mesh/edges/visibility.js";
7
- import { setMeshEdgesWidth } from "./mesh/edges/width.js";
8
- import { openMeshPointsMenu, setMeshPointsNoDataColor, setMeshPointsVertexAttribute } from "./mesh/points/attribute.js";
9
- import { copyMeshPointsColor, pasteMeshPointsColorInput, setMeshPointsColor, setMeshPointsColorInput, setMeshPointsColorWithSlider, setMeshPointsColoringStyle, setMeshPointsOpacity } from "./mesh/points/color.js";
10
- import { setMeshPointsSize } from "./mesh/points/size.js";
11
- import { setMeshPointsVisibility } from "./mesh/points/visibility.js";
12
- import { openMeshPolygonsMenu, setMeshPolygonsColorMap, setMeshPolygonsItem, setMeshPolygonsNoDataColor, setMeshPolygonsPolygonAttribute, setMeshPolygonsTimeStep, setMeshPolygonsVertexAttribute } from "./mesh/polygon/attribute.js";
13
- import { copyMeshPolygonsColor, pasteMeshPolygonsColorInput, setMeshPolygonsColor, setMeshPolygonsColorInput, setMeshPolygonsColorWithSlider, setMeshPolygonsColoringStyle, setMeshPolygonsOpacity } from "./mesh/polygon/color.js";
14
- import { setMeshPolygonsTextures } from "./mesh/polygon/textures.js";
15
- import { setMeshPolygonsVisibility } from "./mesh/polygon/visibility.js";
16
- import { openMeshPolyhedraMenu, setMeshPolyhedraColorMap, setMeshPolyhedraItem, setMeshPolyhedraNoDataColor, setMeshPolyhedraPolyhedronAttribute, setMeshPolyhedraVertexAttribute } from "./mesh/polyhedra/attribute.js";
17
- import { copyMeshPolyhedraColor, pasteMeshPolyhedraColorInput, setMeshPolyhedraColor, setMeshPolyhedraColorBlack, setMeshPolyhedraColorInput, setMeshPolyhedraColorWithSlider, setMeshPolyhedraColoringStyle, setMeshPolyhedraOpacity } from "./mesh/polyhedra/color.js";
18
- import { setMeshPolyhedraVisibility } from "./mesh/polyhedra/visibility.js";
19
- import "./mesh/index.js";
20
- import { setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor, setModelTimeStep } from "./model/attribute.js";
21
- import { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelEdgesColorInput, setModelOpacity, setModelPointsColorInput, setModelPolygonsColorInput, setModelPolyhedraColorInput } from "./model/color.js";
22
- import { setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth } from "./model/edges/components.js";
23
- import { setModelEdgesVisibility } from "./model/edges/visibility.js";
24
- import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "./model/points/components.js";
25
- import { setModelPointsVisibility } from "./model/points/visibility.js";
26
- import { setModelSurfacesVisibility } from "./model/surfaces/visibility.js";
27
- import "./model/index.js";
28
- export { copyMeshCellsColor, copyMeshEdgesColor, copyMeshPointsColor, copyMeshPolygonsColor, copyMeshPolyhedraColor, copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, openMeshCellsMenu, openMeshEdgesMenu, openMeshPointsMenu, openMeshPolygonsMenu, openMeshPolyhedraMenu, pasteMeshCellsColorInput, pasteMeshEdgesColorInput, pasteMeshPointsColorInput, pasteMeshPolygonsColorInput, pasteMeshPolyhedraColorInput, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setMeshCellsCellAttribute, setMeshCellsColor, setMeshCellsColorInput, setMeshCellsColorMap, setMeshCellsColorWithSlider, setMeshCellsColoringStyle, setMeshCellsItem, setMeshCellsNoDataColor, setMeshCellsOpacity, setMeshCellsVertexAttribute, setMeshCellsVisibility, setMeshEdgesColor, setMeshEdgesColorInput, setMeshEdgesColorMap, setMeshEdgesColorWithSlider, setMeshEdgesColoringStyle, setMeshEdgesEdgeAttribute, setMeshEdgesItem, setMeshEdgesNoDataColor, setMeshEdgesOpacity, setMeshEdgesVertexAttribute, setMeshEdgesVisibility, setMeshEdgesWidth, setMeshPointsColor, setMeshPointsColorInput, setMeshPointsColorWithSlider, setMeshPointsColoringStyle, setMeshPointsNoDataColor, setMeshPointsOpacity, setMeshPointsSize, setMeshPointsVertexAttribute, setMeshPointsVisibility, setMeshPolygonsColor, setMeshPolygonsColorInput, setMeshPolygonsColorMap, setMeshPolygonsColorWithSlider, setMeshPolygonsColoringStyle, setMeshPolygonsItem, setMeshPolygonsNoDataColor, setMeshPolygonsOpacity, setMeshPolygonsPolygonAttribute, setMeshPolygonsTextures, setMeshPolygonsTimeStep, setMeshPolygonsVertexAttribute, setMeshPolygonsVisibility, setMeshPolyhedraColor, setMeshPolyhedraColorBlack, setMeshPolyhedraColorInput, setMeshPolyhedraColorMap, setMeshPolyhedraColorWithSlider, setMeshPolyhedraColoringStyle, setMeshPolyhedraItem, setMeshPolyhedraNoDataColor, setMeshPolyhedraOpacity, setMeshPolyhedraPolyhedronAttribute, setMeshPolyhedraVertexAttribute, setMeshPolyhedraVisibility, setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth, setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility, setModelEdgesColorInput, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelEdgesVisibility, setModelOpacity, setModelPointsColorInput, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPointsVisibility, setModelPolygonsColorInput, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraColorInput, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor, setModelSurfacesVisibility, setModelTimeStep };
@@ -1,43 +0,0 @@
1
- import { cellAttributeType, cellsFeatureName, meshViewerObjectType, vertexAttributeType } from "../../../constants.js";
2
- import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
- import { moveMouseOutOfTheWay } from "../../../app_interaction.js";
4
- import { ensureMenuOpen, openStyleMenu } from "../../../viewer_menu.js";
5
- import "../../../viewer_interaction.js";
6
- import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "../../helpers/color_picker.js";
7
- import { setFeatureColorMap } from "../../helpers/attribute_colors.js";
8
- import { setFeatureAttribute, setFeatureItem } from "../../helpers/attribute.js";
9
- //#region tests/e2e/utils/data/mesh/cells/attribute.ts
10
- async function setMeshCellsVertexAttribute(window, attributeName, options = {}) {
11
- await setFeatureAttribute(window, meshViewerObjectType, cellsFeatureName, vertexAttributeType, attributeName, options);
12
- }
13
- async function setMeshCellsCellAttribute(window, attributeName, options = {}) {
14
- await setFeatureAttribute(window, meshViewerObjectType, cellsFeatureName, cellAttributeType, attributeName, options);
15
- }
16
- async function setMeshCellsItem(window, item) {
17
- const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
18
- await setFeatureItem(window, menuTestId, item);
19
- }
20
- async function setMeshCellsColorMap(window, colorMap) {
21
- const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
22
- await setFeatureColorMap(window, menuTestId, colorMap);
23
- }
24
- async function openMeshCellsMenu(window) {
25
- const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
26
- await openStyleMenu(window, menuTestId);
27
- }
28
- async function setMeshCellsNoDataColor(window) {
29
- const menuTestId = `${meshViewerObjectType}${cellsFeatureName}Menu`;
30
- await ensureMenuOpen(window, menuTestId);
31
- const noDataColorBtn = window.getByTestId("noDataColorBtn").first();
32
- await noDataColorBtn.waitFor({ state: "visible" });
33
- await noDataColorBtn.click();
34
- await waitForActionSettled(window);
35
- await window.getByTestId("colorPicker").filter({ visible: true }).first().waitFor({ state: "visible" });
36
- await clickColorPickerSlider(window, SLIDER_PINK);
37
- await clickColorPickerCanvas(window);
38
- await noDataColorBtn.click();
39
- await moveMouseOutOfTheWay(window);
40
- await waitForActionSettled(window);
41
- }
42
- //#endregion
43
- export { openMeshCellsMenu, setMeshCellsCellAttribute, setMeshCellsColorMap, setMeshCellsItem, setMeshCellsNoDataColor, setMeshCellsVertexAttribute };
@@ -1,26 +0,0 @@
1
- import { cellsFeatureName, meshViewerObjectType } from "../../../constants.js";
2
- import { setFeatureColor, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput } from "../../helpers/color.js";
3
- //#region tests/e2e/utils/data/mesh/cells/color.ts
4
- async function setMeshCellsOpacity(window, percent) {
5
- await setFeatureOpacity(window, meshViewerObjectType, cellsFeatureName, percent);
6
- }
7
- async function setMeshCellsColor(window) {
8
- await setFeatureColor(window, meshViewerObjectType, cellsFeatureName);
9
- }
10
- async function setMeshCellsColorWithSlider(window) {
11
- await setFeatureColorWithSlider(window, meshViewerObjectType, cellsFeatureName);
12
- }
13
- async function copyMeshCellsColor(window) {
14
- await setFeatureCopyColor(window, meshViewerObjectType, cellsFeatureName);
15
- }
16
- async function setMeshCellsColorInput(window, colorText) {
17
- await setFeatureColorInput(window, meshViewerObjectType, cellsFeatureName, colorText);
18
- }
19
- async function pasteMeshCellsColorInput(window, container = window) {
20
- await setFeaturePasteColorInput(window, meshViewerObjectType, cellsFeatureName, container);
21
- }
22
- async function setMeshCellsColoringStyle(window, style) {
23
- await setFeatureColoringStyle(window, meshViewerObjectType, cellsFeatureName, style);
24
- }
25
- //#endregion
26
- export { copyMeshCellsColor, pasteMeshCellsColorInput, setMeshCellsColor, setMeshCellsColorInput, setMeshCellsColorWithSlider, setMeshCellsColoringStyle, setMeshCellsOpacity };
@@ -1,4 +0,0 @@
1
- import { openMeshCellsMenu, setMeshCellsCellAttribute, setMeshCellsColorMap, setMeshCellsItem, setMeshCellsNoDataColor, setMeshCellsVertexAttribute } from "./attribute.js";
2
- import { copyMeshCellsColor, pasteMeshCellsColorInput, setMeshCellsColor, setMeshCellsColorInput, setMeshCellsColorWithSlider, setMeshCellsColoringStyle, setMeshCellsOpacity } from "./color.js";
3
- import { setMeshCellsVisibility } from "./visibility.js";
4
- export { copyMeshCellsColor, openMeshCellsMenu, pasteMeshCellsColorInput, setMeshCellsCellAttribute, setMeshCellsColor, setMeshCellsColorInput, setMeshCellsColorMap, setMeshCellsColorWithSlider, setMeshCellsColoringStyle, setMeshCellsItem, setMeshCellsNoDataColor, setMeshCellsOpacity, setMeshCellsVertexAttribute, setMeshCellsVisibility };
@@ -1,9 +0,0 @@
1
- import { meshViewerObjectType } from "../../../constants.js";
2
- import { setCellsVisibility } from "../../../viewer_menu.js";
3
- import "../../../viewer_interaction.js";
4
- //#region tests/e2e/utils/data/mesh/cells/visibility.ts
5
- async function setMeshCellsVisibility(window, visibility) {
6
- await setCellsVisibility(window, meshViewerObjectType, visibility);
7
- }
8
- //#endregion
9
- export { setMeshCellsVisibility };
@@ -1,43 +0,0 @@
1
- import { edgeAttributeType, edgesFeatureName, meshViewerObjectType, vertexAttributeType } from "../../../constants.js";
2
- import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
- import { moveMouseOutOfTheWay } from "../../../app_interaction.js";
4
- import { ensureMenuOpen, openStyleMenu } from "../../../viewer_menu.js";
5
- import "../../../viewer_interaction.js";
6
- import { SLIDER_PINK, clickColorPickerCanvas, clickColorPickerSlider } from "../../helpers/color_picker.js";
7
- import { setFeatureColorMap } from "../../helpers/attribute_colors.js";
8
- import { setFeatureAttribute, setFeatureItem } from "../../helpers/attribute.js";
9
- //#region tests/e2e/utils/data/mesh/edges/attribute.ts
10
- async function setMeshEdgesVertexAttribute(window, attributeName, options = {}) {
11
- await setFeatureAttribute(window, meshViewerObjectType, edgesFeatureName, vertexAttributeType, attributeName, options);
12
- }
13
- async function setMeshEdgesEdgeAttribute(window, attributeName, options = {}) {
14
- await setFeatureAttribute(window, meshViewerObjectType, edgesFeatureName, edgeAttributeType, attributeName, options);
15
- }
16
- async function setMeshEdgesItem(window, item) {
17
- const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
18
- await setFeatureItem(window, menuTestId, item);
19
- }
20
- async function setMeshEdgesColorMap(window, colorMap) {
21
- const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
22
- await setFeatureColorMap(window, menuTestId, colorMap);
23
- }
24
- async function openMeshEdgesMenu(window) {
25
- const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
26
- await openStyleMenu(window, menuTestId);
27
- }
28
- async function setMeshEdgesNoDataColor(window) {
29
- const menuTestId = `${meshViewerObjectType}${edgesFeatureName}Menu`;
30
- await ensureMenuOpen(window, menuTestId);
31
- const noDataColorBtn = window.getByTestId("noDataColorBtn").first();
32
- await noDataColorBtn.waitFor({ state: "visible" });
33
- await noDataColorBtn.click();
34
- await waitForActionSettled(window);
35
- await window.getByTestId("colorPicker").filter({ visible: true }).first().waitFor({ state: "visible" });
36
- await clickColorPickerSlider(window, SLIDER_PINK);
37
- await clickColorPickerCanvas(window);
38
- await noDataColorBtn.click();
39
- await moveMouseOutOfTheWay(window);
40
- await waitForActionSettled(window);
41
- }
42
- //#endregion
43
- export { openMeshEdgesMenu, setMeshEdgesColorMap, setMeshEdgesEdgeAttribute, setMeshEdgesItem, setMeshEdgesNoDataColor, setMeshEdgesVertexAttribute };
@@ -1,26 +0,0 @@
1
- import { edgesFeatureName, meshViewerObjectType } from "../../../constants.js";
2
- import { setFeatureColor, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput } from "../../helpers/color.js";
3
- //#region tests/e2e/utils/data/mesh/edges/color.ts
4
- async function setMeshEdgesOpacity(window, percent) {
5
- await setFeatureOpacity(window, meshViewerObjectType, edgesFeatureName, percent);
6
- }
7
- async function setMeshEdgesColor(window) {
8
- await setFeatureColor(window, meshViewerObjectType, edgesFeatureName);
9
- }
10
- async function setMeshEdgesColorWithSlider(window) {
11
- await setFeatureColorWithSlider(window, meshViewerObjectType, edgesFeatureName);
12
- }
13
- async function copyMeshEdgesColor(window) {
14
- await setFeatureCopyColor(window, meshViewerObjectType, edgesFeatureName);
15
- }
16
- async function setMeshEdgesColorInput(window, colorText) {
17
- await setFeatureColorInput(window, meshViewerObjectType, edgesFeatureName, colorText);
18
- }
19
- async function pasteMeshEdgesColorInput(window, container = window) {
20
- await setFeaturePasteColorInput(window, meshViewerObjectType, edgesFeatureName, container);
21
- }
22
- async function setMeshEdgesColoringStyle(window, style) {
23
- await setFeatureColoringStyle(window, meshViewerObjectType, edgesFeatureName, style);
24
- }
25
- //#endregion
26
- export { copyMeshEdgesColor, pasteMeshEdgesColorInput, setMeshEdgesColor, setMeshEdgesColorInput, setMeshEdgesColorWithSlider, setMeshEdgesColoringStyle, setMeshEdgesOpacity };
@@ -1,5 +0,0 @@
1
- import { openMeshEdgesMenu, setMeshEdgesColorMap, setMeshEdgesEdgeAttribute, setMeshEdgesItem, setMeshEdgesNoDataColor, setMeshEdgesVertexAttribute } from "./attribute.js";
2
- import { copyMeshEdgesColor, pasteMeshEdgesColorInput, setMeshEdgesColor, setMeshEdgesColorInput, setMeshEdgesColorWithSlider, setMeshEdgesColoringStyle, setMeshEdgesOpacity } from "./color.js";
3
- import { setMeshEdgesVisibility } from "./visibility.js";
4
- import { setMeshEdgesWidth } from "./width.js";
5
- export { copyMeshEdgesColor, openMeshEdgesMenu, pasteMeshEdgesColorInput, setMeshEdgesColor, setMeshEdgesColorInput, setMeshEdgesColorMap, setMeshEdgesColorWithSlider, setMeshEdgesColoringStyle, setMeshEdgesEdgeAttribute, setMeshEdgesItem, setMeshEdgesNoDataColor, setMeshEdgesOpacity, setMeshEdgesVertexAttribute, setMeshEdgesVisibility, setMeshEdgesWidth };
@@ -1,9 +0,0 @@
1
- import { meshViewerObjectType } from "../../../constants.js";
2
- import { setEdgesVisibility } from "../../../viewer_menu.js";
3
- import "../../../viewer_interaction.js";
4
- //#region tests/e2e/utils/data/mesh/edges/visibility.ts
5
- async function setMeshEdgesVisibility(window, visibility) {
6
- await setEdgesVisibility(window, meshViewerObjectType, visibility);
7
- }
8
- //#endregion
9
- export { setMeshEdgesVisibility };
@@ -1,9 +0,0 @@
1
- import { meshViewerObjectType } from "../../../constants.js";
2
- import { setEdgesWidth } from "../../../viewer_menu.js";
3
- import "../../../viewer_interaction.js";
4
- //#region tests/e2e/utils/data/mesh/edges/width.ts
5
- async function setMeshEdgesWidth(window, value) {
6
- await setEdgesWidth(window, meshViewerObjectType, value);
7
- }
8
- //#endregion
9
- export { setMeshEdgesWidth };