@geode/opengeodeweb-front 11.1.0-rc.1 → 11.1.0

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 (123) hide show
  1. package/.build/tests/browser/helpers/app_interaction.js +24 -0
  2. package/.build/tests/browser/helpers/basemap.js +55 -0
  3. package/.build/tests/browser/helpers/camera_filters.js +105 -0
  4. package/.build/tests/browser/helpers/camera_interaction.js +107 -0
  5. package/.build/tests/browser/helpers/camera_tools.js +43 -0
  6. package/.build/tests/browser/helpers/clipping_planes_interaction.js +80 -0
  7. package/.build/tests/browser/helpers/constants.js +43 -0
  8. package/.build/tests/browser/helpers/data/constants.js +26 -0
  9. package/.build/tests/browser/helpers/data/helpers/attribute.js +85 -0
  10. package/.build/tests/browser/helpers/data/helpers/attribute_colors.js +47 -0
  11. package/.build/tests/browser/helpers/data/helpers/attribute_menu.js +13 -0
  12. package/.build/tests/browser/helpers/data/helpers/color.js +98 -0
  13. package/.build/tests/browser/helpers/data/helpers/color_picker.js +52 -0
  14. package/.build/tests/browser/helpers/data/helpers/textures.js +26 -0
  15. package/.build/tests/browser/helpers/data/index.js +28 -0
  16. package/.build/tests/browser/helpers/data/mesh/cells/attribute.js +43 -0
  17. package/.build/tests/browser/helpers/data/mesh/cells/color.js +26 -0
  18. package/.build/tests/browser/helpers/data/mesh/cells/index.js +4 -0
  19. package/.build/tests/browser/helpers/data/mesh/cells/visibility.js +9 -0
  20. package/.build/tests/browser/helpers/data/mesh/edges/attribute.js +43 -0
  21. package/.build/tests/browser/helpers/data/mesh/edges/color.js +26 -0
  22. package/.build/tests/browser/helpers/data/mesh/edges/index.js +5 -0
  23. package/.build/tests/browser/helpers/data/mesh/edges/visibility.js +9 -0
  24. package/.build/tests/browser/helpers/data/mesh/edges/width.js +9 -0
  25. package/.build/tests/browser/helpers/data/mesh/index.js +24 -0
  26. package/.build/tests/browser/helpers/data/mesh/points/attribute.js +31 -0
  27. package/.build/tests/browser/helpers/data/mesh/points/color.js +26 -0
  28. package/.build/tests/browser/helpers/data/mesh/points/index.js +5 -0
  29. package/.build/tests/browser/helpers/data/mesh/points/size.js +9 -0
  30. package/.build/tests/browser/helpers/data/mesh/points/visibility.js +9 -0
  31. package/.build/tests/browser/helpers/data/mesh/polygon/attribute.js +47 -0
  32. package/.build/tests/browser/helpers/data/mesh/polygon/color.js +26 -0
  33. package/.build/tests/browser/helpers/data/mesh/polygon/index.js +5 -0
  34. package/.build/tests/browser/helpers/data/mesh/polygon/test_texture.png +0 -0
  35. package/.build/tests/browser/helpers/data/mesh/polygon/textures.js +14 -0
  36. package/.build/tests/browser/helpers/data/mesh/polygon/visibility.js +9 -0
  37. package/.build/tests/browser/helpers/data/mesh/polyhedra/attribute.js +43 -0
  38. package/.build/tests/browser/helpers/data/mesh/polyhedra/color.js +29 -0
  39. package/.build/tests/browser/helpers/data/mesh/polyhedra/index.js +4 -0
  40. package/.build/tests/browser/helpers/data/mesh/polyhedra/visibility.js +9 -0
  41. package/.build/tests/browser/helpers/data/model/attribute.js +99 -0
  42. package/.build/tests/browser/helpers/data/model/color.js +69 -0
  43. package/.build/tests/browser/helpers/data/model/edges/components.js +50 -0
  44. package/.build/tests/browser/helpers/data/model/edges/index.js +3 -0
  45. package/.build/tests/browser/helpers/data/model/edges/visibility.js +9 -0
  46. package/.build/tests/browser/helpers/data/model/index.js +11 -0
  47. package/.build/tests/browser/helpers/data/model/points/components.js +50 -0
  48. package/.build/tests/browser/helpers/data/model/points/index.js +3 -0
  49. package/.build/tests/browser/helpers/data/model/points/visibility.js +9 -0
  50. package/.build/tests/browser/helpers/data/model/style_menu.js +10 -0
  51. package/.build/tests/browser/helpers/data/model/surfaces/index.js +2 -0
  52. package/.build/tests/browser/helpers/data/model/surfaces/visibility.js +8 -0
  53. package/.build/tests/browser/helpers/model_tabs.js +35 -0
  54. package/.build/tests/browser/helpers/object_trees/common.js +122 -0
  55. package/.build/tests/browser/helpers/object_trees/main_object_tree.js +86 -0
  56. package/.build/tests/browser/helpers/object_trees/model_components_object_tree.js +111 -0
  57. package/.build/tests/browser/helpers/other.js +13 -0
  58. package/.build/tests/browser/helpers/viewer_canvas.js +83 -0
  59. package/.build/tests/browser/helpers/viewer_interaction.js +87 -0
  60. package/.build/tests/browser/helpers/viewer_menu.js +98 -0
  61. package/.build/tests/browser/helpers/wait_for_action_settled.js +63 -0
  62. package/package.json +23 -7
  63. package/tests/browser/helpers/app_interaction.ts +35 -0
  64. package/tests/browser/helpers/basemap.ts +89 -0
  65. package/tests/browser/helpers/camera_filters.ts +176 -0
  66. package/tests/browser/helpers/camera_interaction.ts +179 -0
  67. package/tests/browser/helpers/camera_tools.ts +62 -0
  68. package/tests/browser/helpers/clipping_planes_interaction.ts +126 -0
  69. package/tests/browser/helpers/constants.ts +100 -0
  70. package/tests/browser/helpers/data/constants.ts +58 -0
  71. package/tests/browser/helpers/data/helpers/attribute.ts +152 -0
  72. package/tests/browser/helpers/data/helpers/attribute_colors.ts +79 -0
  73. package/tests/browser/helpers/data/helpers/attribute_menu.ts +19 -0
  74. package/tests/browser/helpers/data/helpers/color.ts +214 -0
  75. package/tests/browser/helpers/data/helpers/color_picker.ts +82 -0
  76. package/tests/browser/helpers/data/helpers/textures.ts +41 -0
  77. package/tests/browser/helpers/data/index.ts +2 -0
  78. package/tests/browser/helpers/data/mesh/cells/attribute.ts +103 -0
  79. package/tests/browser/helpers/data/mesh/cells/color.ts +52 -0
  80. package/tests/browser/helpers/data/mesh/cells/index.ts +3 -0
  81. package/tests/browser/helpers/data/mesh/cells/visibility.ts +9 -0
  82. package/tests/browser/helpers/data/mesh/edges/attribute.ts +103 -0
  83. package/tests/browser/helpers/data/mesh/edges/color.ts +52 -0
  84. package/tests/browser/helpers/data/mesh/edges/index.ts +4 -0
  85. package/tests/browser/helpers/data/mesh/edges/visibility.ts +9 -0
  86. package/tests/browser/helpers/data/mesh/edges/width.ts +9 -0
  87. package/tests/browser/helpers/data/mesh/index.ts +6 -0
  88. package/tests/browser/helpers/data/mesh/points/attribute.ts +66 -0
  89. package/tests/browser/helpers/data/mesh/points/color.ts +52 -0
  90. package/tests/browser/helpers/data/mesh/points/index.ts +4 -0
  91. package/tests/browser/helpers/data/mesh/points/size.ts +9 -0
  92. package/tests/browser/helpers/data/mesh/points/visibility.ts +9 -0
  93. package/tests/browser/helpers/data/mesh/polygon/attribute.ts +110 -0
  94. package/tests/browser/helpers/data/mesh/polygon/color.ts +52 -0
  95. package/tests/browser/helpers/data/mesh/polygon/index.ts +4 -0
  96. package/tests/browser/helpers/data/mesh/polygon/test_texture.png +0 -0
  97. package/tests/browser/helpers/data/mesh/polygon/textures.ts +21 -0
  98. package/tests/browser/helpers/data/mesh/polygon/visibility.ts +9 -0
  99. package/tests/browser/helpers/data/mesh/polyhedra/attribute.ts +103 -0
  100. package/tests/browser/helpers/data/mesh/polyhedra/color.ts +58 -0
  101. package/tests/browser/helpers/data/mesh/polyhedra/index.ts +3 -0
  102. package/tests/browser/helpers/data/mesh/polyhedra/visibility.ts +9 -0
  103. package/tests/browser/helpers/data/model/attribute.ts +180 -0
  104. package/tests/browser/helpers/data/model/color.ts +110 -0
  105. package/tests/browser/helpers/data/model/edges/components.ts +97 -0
  106. package/tests/browser/helpers/data/model/edges/index.ts +2 -0
  107. package/tests/browser/helpers/data/model/edges/visibility.ts +9 -0
  108. package/tests/browser/helpers/data/model/index.ts +5 -0
  109. package/tests/browser/helpers/data/model/points/components.ts +97 -0
  110. package/tests/browser/helpers/data/model/points/index.ts +2 -0
  111. package/tests/browser/helpers/data/model/points/visibility.ts +9 -0
  112. package/tests/browser/helpers/data/model/style_menu.ts +11 -0
  113. package/tests/browser/helpers/data/model/surfaces/index.ts +1 -0
  114. package/tests/browser/helpers/data/model/surfaces/visibility.ts +8 -0
  115. package/tests/browser/helpers/model_tabs.ts +61 -0
  116. package/tests/browser/helpers/object_trees/common.ts +212 -0
  117. package/tests/browser/helpers/object_trees/main_object_tree.ts +167 -0
  118. package/tests/browser/helpers/object_trees/model_components_object_tree.ts +219 -0
  119. package/tests/browser/helpers/other.ts +15 -0
  120. package/tests/browser/helpers/viewer_canvas.ts +136 -0
  121. package/tests/browser/helpers/viewer_interaction.ts +96 -0
  122. package/tests/browser/helpers/viewer_menu.ts +205 -0
  123. package/tests/browser/helpers/wait_for_action_settled.ts +108 -0
@@ -0,0 +1,9 @@
1
+ import { meshViewerObjectType } from "../../../constants.js";
2
+ import { setPolygonsVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
4
+ //#region tests/browser/helpers/data/mesh/polygon/visibility.ts
5
+ async function setMeshPolygonsVisibility(window, visibility) {
6
+ await setPolygonsVisibility(window, meshViewerObjectType, visibility);
7
+ }
8
+ //#endregion
9
+ export { setMeshPolygonsVisibility };
@@ -0,0 +1,43 @@
1
+ import { meshViewerObjectType, polyhedraFeatureName, polyhedronAttributeType, 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/browser/helpers/data/mesh/polyhedra/attribute.ts
10
+ async function setMeshPolyhedraVertexAttribute(window, attributeName, options = {}) {
11
+ await setFeatureAttribute(window, meshViewerObjectType, polyhedraFeatureName, vertexAttributeType, attributeName, options);
12
+ }
13
+ async function setMeshPolyhedraPolyhedronAttribute(window, attributeName, options = {}) {
14
+ await setFeatureAttribute(window, meshViewerObjectType, polyhedraFeatureName, polyhedronAttributeType, attributeName, options);
15
+ }
16
+ async function setMeshPolyhedraItem(window, item) {
17
+ const menuTestId = `${meshViewerObjectType}${polyhedraFeatureName}Menu`;
18
+ await setFeatureItem(window, menuTestId, item);
19
+ }
20
+ async function setMeshPolyhedraColorMap(window, colorMap) {
21
+ const menuTestId = `${meshViewerObjectType}${polyhedraFeatureName}Menu`;
22
+ await setFeatureColorMap(window, menuTestId, colorMap);
23
+ }
24
+ async function openMeshPolyhedraMenu(window) {
25
+ const menuTestId = `${meshViewerObjectType}${polyhedraFeatureName}Menu`;
26
+ await openStyleMenu(window, menuTestId);
27
+ }
28
+ async function setMeshPolyhedraNoDataColor(window) {
29
+ const menuTestId = `${meshViewerObjectType}${polyhedraFeatureName}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 { openMeshPolyhedraMenu, setMeshPolyhedraColorMap, setMeshPolyhedraItem, setMeshPolyhedraNoDataColor, setMeshPolyhedraPolyhedronAttribute, setMeshPolyhedraVertexAttribute };
@@ -0,0 +1,29 @@
1
+ import { meshViewerObjectType, polyhedraFeatureName } from "../../../constants.js";
2
+ import { setFeatureColor, setFeatureColorBlack, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput } from "../../helpers/color.js";
3
+ //#region tests/browser/helpers/data/mesh/polyhedra/color.ts
4
+ async function setMeshPolyhedraOpacity(window, percent) {
5
+ await setFeatureOpacity(window, meshViewerObjectType, polyhedraFeatureName, percent);
6
+ }
7
+ async function setMeshPolyhedraColor(window) {
8
+ await setFeatureColor(window, meshViewerObjectType, polyhedraFeatureName);
9
+ }
10
+ async function setMeshPolyhedraColorBlack(window) {
11
+ await setFeatureColorBlack(window, meshViewerObjectType, polyhedraFeatureName);
12
+ }
13
+ async function setMeshPolyhedraColorWithSlider(window) {
14
+ await setFeatureColorWithSlider(window, meshViewerObjectType, polyhedraFeatureName);
15
+ }
16
+ async function copyMeshPolyhedraColor(window) {
17
+ await setFeatureCopyColor(window, meshViewerObjectType, polyhedraFeatureName);
18
+ }
19
+ async function setMeshPolyhedraColorInput(window, colorText) {
20
+ await setFeatureColorInput(window, meshViewerObjectType, polyhedraFeatureName, colorText);
21
+ }
22
+ async function pasteMeshPolyhedraColorInput(window, container = window) {
23
+ await setFeaturePasteColorInput(window, meshViewerObjectType, polyhedraFeatureName, container);
24
+ }
25
+ async function setMeshPolyhedraColoringStyle(window, style) {
26
+ await setFeatureColoringStyle(window, meshViewerObjectType, polyhedraFeatureName, style);
27
+ }
28
+ //#endregion
29
+ export { copyMeshPolyhedraColor, pasteMeshPolyhedraColorInput, setMeshPolyhedraColor, setMeshPolyhedraColorBlack, setMeshPolyhedraColorInput, setMeshPolyhedraColorWithSlider, setMeshPolyhedraColoringStyle, setMeshPolyhedraOpacity };
@@ -0,0 +1,4 @@
1
+ import { openMeshPolyhedraMenu, setMeshPolyhedraColorMap, setMeshPolyhedraItem, setMeshPolyhedraNoDataColor, setMeshPolyhedraPolyhedronAttribute, setMeshPolyhedraVertexAttribute } from "./attribute.js";
2
+ import { copyMeshPolyhedraColor, pasteMeshPolyhedraColorInput, setMeshPolyhedraColor, setMeshPolyhedraColorBlack, setMeshPolyhedraColorInput, setMeshPolyhedraColorWithSlider, setMeshPolyhedraColoringStyle, setMeshPolyhedraOpacity } from "./color.js";
3
+ import { setMeshPolyhedraVisibility } from "./visibility.js";
4
+ export { copyMeshPolyhedraColor, openMeshPolyhedraMenu, pasteMeshPolyhedraColorInput, setMeshPolyhedraColor, setMeshPolyhedraColorBlack, setMeshPolyhedraColorInput, setMeshPolyhedraColorMap, setMeshPolyhedraColorWithSlider, setMeshPolyhedraColoringStyle, setMeshPolyhedraItem, setMeshPolyhedraNoDataColor, setMeshPolyhedraOpacity, setMeshPolyhedraPolyhedronAttribute, setMeshPolyhedraVertexAttribute, setMeshPolyhedraVisibility };
@@ -0,0 +1,9 @@
1
+ import { meshViewerObjectType } from "../../../constants.js";
2
+ import { setPolyhedraVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
4
+ //#region tests/browser/helpers/data/mesh/polyhedra/visibility.ts
5
+ async function setMeshPolyhedraVisibility(window, visibility) {
6
+ await setPolyhedraVisibility(window, meshViewerObjectType, visibility);
7
+ }
8
+ //#endregion
9
+ export { setMeshPolyhedraVisibility };
@@ -0,0 +1,99 @@
1
+ import { cellAttributeType, edgeAttributeType, polygonAttributeType, polyhedronAttributeType, vertexAttributeType } from "../../constants.js";
2
+ import { setFeatureNoDataColor } from "../helpers/attribute_colors.js";
3
+ import { applyAttribute, setFeatureTimeStep } from "../helpers/attribute.js";
4
+ import { showModelStyleOptions } from "./style_menu.js";
5
+ //#region tests/browser/helpers/data/model/attribute.ts
6
+ async function setModelPointsVertexAttribute(window, attributeName, options = {}) {
7
+ await showModelStyleOptions(window);
8
+ await applyAttribute(window, "modelStyleMenu", {
9
+ attributeType: vertexAttributeType,
10
+ attributeName,
11
+ ...options
12
+ });
13
+ }
14
+ async function setModelPointsVertexAttributeNoDataColor(window) {
15
+ await showModelStyleOptions(window);
16
+ await setFeatureNoDataColor(window, "modelStyleMenu");
17
+ }
18
+ async function setModelEdgesVertexAttribute(window, attributeName, options = {}) {
19
+ await showModelStyleOptions(window);
20
+ await applyAttribute(window, "modelStyleMenu", {
21
+ attributeType: vertexAttributeType,
22
+ attributeName,
23
+ ...options
24
+ });
25
+ }
26
+ async function setModelEdgesVertexAttributeNoDataColor(window) {
27
+ await showModelStyleOptions(window);
28
+ await setFeatureNoDataColor(window, "modelStyleMenu");
29
+ }
30
+ async function setModelPolygonsVertexAttribute(window, attributeName, options = {}) {
31
+ await showModelStyleOptions(window);
32
+ await applyAttribute(window, "modelStyleMenu", {
33
+ attributeType: vertexAttributeType,
34
+ attributeName,
35
+ ...options
36
+ });
37
+ }
38
+ async function setModelPolygonsVertexAttributeNoDataColor(window) {
39
+ await showModelStyleOptions(window);
40
+ await setFeatureNoDataColor(window, "modelStyleMenu");
41
+ }
42
+ async function setModelPolyhedraVertexAttribute(window, attributeName, options = {}) {
43
+ await showModelStyleOptions(window);
44
+ await applyAttribute(window, "modelStyleMenu", {
45
+ attributeType: vertexAttributeType,
46
+ attributeName,
47
+ ...options
48
+ });
49
+ }
50
+ async function setModelPolyhedraVertexAttributeNoDataColor(window) {
51
+ await showModelStyleOptions(window);
52
+ await setFeatureNoDataColor(window, "modelStyleMenu");
53
+ }
54
+ async function setModelCellsVertexAttribute(window, attributeName, options = {}) {
55
+ await showModelStyleOptions(window);
56
+ await applyAttribute(window, "modelStyleMenu", {
57
+ attributeType: vertexAttributeType,
58
+ attributeName,
59
+ ...options
60
+ });
61
+ }
62
+ async function setModelEdgesEdgeAttribute(window, attributeName, options = {}) {
63
+ await showModelStyleOptions(window);
64
+ await applyAttribute(window, "modelStyleMenu", {
65
+ attributeType: edgeAttributeType,
66
+ attributeName,
67
+ ...options
68
+ });
69
+ }
70
+ async function setModelPolygonsPolygonAttribute(window, attributeName, options = {}) {
71
+ await showModelStyleOptions(window);
72
+ await applyAttribute(window, "modelStyleMenu", {
73
+ attributeType: polygonAttributeType,
74
+ attributeName,
75
+ ...options
76
+ });
77
+ }
78
+ async function setModelPolyhedraPolyhedronAttribute(window, attributeName, options = {}) {
79
+ await showModelStyleOptions(window);
80
+ await applyAttribute(window, "modelStyleMenu", {
81
+ attributeType: polyhedronAttributeType,
82
+ attributeName,
83
+ ...options
84
+ });
85
+ }
86
+ async function setModelCellsCellAttribute(window, attributeName, options = {}) {
87
+ await showModelStyleOptions(window);
88
+ await applyAttribute(window, "modelStyleMenu", {
89
+ attributeType: cellAttributeType,
90
+ attributeName,
91
+ ...options
92
+ });
93
+ }
94
+ async function setModelTimeStep(window, timeStep) {
95
+ await showModelStyleOptions(window);
96
+ await setFeatureTimeStep(window, window.getByTestId("modelStyleMenu"), timeStep);
97
+ }
98
+ //#endregion
99
+ export { setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor, setModelTimeStep };
@@ -0,0 +1,69 @@
1
+ import { copyColor, pasteColorInput, setColor, setColorInput, setColorWithSlider, setColoringStyle, setOpacity } from "../helpers/color.js";
2
+ import { showModelStyleOptions } from "./style_menu.js";
3
+ //#region tests/browser/helpers/data/model/color.ts
4
+ async function setModelOpacity(window, percent) {
5
+ await showModelStyleOptions(window);
6
+ await setOpacity(window, "modelStyleMenu", percent);
7
+ }
8
+ async function setModelColor(window) {
9
+ await showModelStyleOptions(window);
10
+ await setColor(window, "modelStyleMenu");
11
+ }
12
+ async function setModelColorWithSlider(window) {
13
+ await showModelStyleOptions(window);
14
+ await setColorWithSlider(window, "modelStyleMenu");
15
+ }
16
+ async function setModelColoringStyle(window, style) {
17
+ await showModelStyleOptions(window);
18
+ await setColoringStyle(window, "modelStyleMenu", style);
19
+ }
20
+ async function copyModelPointsColor(window) {
21
+ await showModelStyleOptions(window);
22
+ await copyColor(window, "modelStyleMenu");
23
+ }
24
+ async function setModelPointsColorInput(window, colorText) {
25
+ await showModelStyleOptions(window);
26
+ await setColorInput(window, "modelStyleMenu", colorText);
27
+ }
28
+ async function pasteModelPointsColorInput(window) {
29
+ await showModelStyleOptions(window);
30
+ await pasteColorInput(window, "modelStyleMenu");
31
+ }
32
+ async function copyModelEdgesColor(window) {
33
+ await showModelStyleOptions(window);
34
+ await copyColor(window, "modelStyleMenu");
35
+ }
36
+ async function setModelEdgesColorInput(window, colorText) {
37
+ await showModelStyleOptions(window);
38
+ await setColorInput(window, "modelStyleMenu", colorText);
39
+ }
40
+ async function pasteModelEdgesColorInput(window) {
41
+ await showModelStyleOptions(window);
42
+ await pasteColorInput(window, "modelStyleMenu");
43
+ }
44
+ async function copyModelPolygonsColor(window) {
45
+ await showModelStyleOptions(window);
46
+ await copyColor(window, "modelStyleMenu");
47
+ }
48
+ async function setModelPolygonsColorInput(window, colorText) {
49
+ await showModelStyleOptions(window);
50
+ await setColorInput(window, "modelStyleMenu", colorText);
51
+ }
52
+ async function pasteModelPolygonsColorInput(window) {
53
+ await showModelStyleOptions(window);
54
+ await pasteColorInput(window, "modelStyleMenu");
55
+ }
56
+ async function copyModelPolyhedraColor(window) {
57
+ await showModelStyleOptions(window);
58
+ await copyColor(window, "modelStyleMenu");
59
+ }
60
+ async function setModelPolyhedraColorInput(window, colorText) {
61
+ await showModelStyleOptions(window);
62
+ await setColorInput(window, "modelStyleMenu", colorText);
63
+ }
64
+ async function pasteModelPolyhedraColorInput(window) {
65
+ await showModelStyleOptions(window);
66
+ await pasteColorInput(window, "modelStyleMenu");
67
+ }
68
+ //#endregion
69
+ export { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelEdgesColorInput, setModelOpacity, setModelPointsColorInput, setModelPolygonsColorInput, setModelPolyhedraColorInput };
@@ -0,0 +1,50 @@
1
+ import { vertexAttributeType } from "../../../constants.js";
2
+ import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
+ import { selectModelTab } from "../../../model_tabs.js";
4
+ import { ensureFeatureVisible, ensureMenuOpen } from "../../../viewer_menu.js";
5
+ import "../../../viewer_interaction.js";
6
+ import { applyAttribute } from "../../helpers/attribute.js";
7
+ import { setColor } from "../../helpers/color.js";
8
+ //#region tests/browser/helpers/data/model/edges/components.ts
9
+ const modelEdgesMenuTestId = "modelEdgesMenu";
10
+ function getModelEdgesSection(window, section) {
11
+ return window.getByTestId(section).filter({ visible: true }).first();
12
+ }
13
+ const SECTION_TABS = {
14
+ modelEdgesComponentsOptions: "components",
15
+ modelEdgesComponentTypeOptions: "type",
16
+ modelEdgesComponentOptions: "component"
17
+ };
18
+ async function setModelComponentsEdgesVisibility(window, section, visibility) {
19
+ await ensureMenuOpen(window, modelEdgesMenuTestId);
20
+ await ensureFeatureVisible(window, modelEdgesMenuTestId);
21
+ await selectModelTab(window, SECTION_TABS[section]);
22
+ const visibilitySwitch = getModelEdgesSection(window, section).getByTestId("modelComponentEdgesVisibilitySwitch").getByRole("checkbox");
23
+ if (await visibilitySwitch.isChecked() !== visibility) {
24
+ await visibilitySwitch.setChecked(visibility, { force: true });
25
+ await waitForActionSettled(window);
26
+ }
27
+ }
28
+ async function setModelComponentsEdgesWidth(window, section, value) {
29
+ await setModelComponentsEdgesVisibility(window, section, true);
30
+ await getModelEdgesSection(window, section).getByTestId("modelComponentEdgesWidthSlider").locator("input").first().evaluate((node, val) => {
31
+ node.value = val;
32
+ node.dispatchEvent(new Event("input", { bubbles: true }));
33
+ node.dispatchEvent(new Event("change", { bubbles: true }));
34
+ }, value.toString());
35
+ await waitForActionSettled(window);
36
+ }
37
+ async function setModelComponentsEdgesColor(window, section) {
38
+ await setModelComponentsEdgesVisibility(window, section, true);
39
+ await setColor(window, modelEdgesMenuTestId, getModelEdgesSection(window, section));
40
+ }
41
+ async function setModelComponentsEdgesVertexAttribute(window, section, attributeName, options = {}) {
42
+ await setModelComponentsEdgesVisibility(window, section, true);
43
+ await applyAttribute(window, getModelEdgesSection(window, section), {
44
+ attributeType: vertexAttributeType,
45
+ attributeName,
46
+ ...options
47
+ });
48
+ }
49
+ //#endregion
50
+ export { setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth };
@@ -0,0 +1,3 @@
1
+ import { setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth } from "./components.js";
2
+ import { setModelEdgesVisibility } from "./visibility.js";
3
+ export { setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth, setModelEdgesVisibility };
@@ -0,0 +1,9 @@
1
+ import { modelViewerObjectType } from "../../../constants.js";
2
+ import { setEdgesVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
4
+ //#region tests/browser/helpers/data/model/edges/visibility.ts
5
+ async function setModelEdgesVisibility(window, visibility) {
6
+ await setEdgesVisibility(window, modelViewerObjectType, visibility);
7
+ }
8
+ //#endregion
9
+ export { setModelEdgesVisibility };
@@ -0,0 +1,11 @@
1
+ import { setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor, setModelTimeStep } from "./attribute.js";
2
+ import { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelEdgesColorInput, setModelOpacity, setModelPointsColorInput, setModelPolygonsColorInput, setModelPolyhedraColorInput } from "./color.js";
3
+ import { setModelComponentsEdgesColor, setModelComponentsEdgesVertexAttribute, setModelComponentsEdgesVisibility, setModelComponentsEdgesWidth } from "./edges/components.js";
4
+ import { setModelEdgesVisibility } from "./edges/visibility.js";
5
+ import "./edges/index.js";
6
+ import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "./points/components.js";
7
+ import { setModelPointsVisibility } from "./points/visibility.js";
8
+ import "./points/index.js";
9
+ import { setModelSurfacesVisibility } from "./surfaces/visibility.js";
10
+ import "./surfaces/index.js";
11
+ export { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, 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 };
@@ -0,0 +1,50 @@
1
+ import { vertexAttributeType } from "../../../constants.js";
2
+ import { waitForActionSettled } from "../../../wait_for_action_settled.js";
3
+ import { selectModelTab } from "../../../model_tabs.js";
4
+ import { ensureFeatureVisible, ensureMenuOpen } from "../../../viewer_menu.js";
5
+ import "../../../viewer_interaction.js";
6
+ import { applyAttribute } from "../../helpers/attribute.js";
7
+ import { setColor } from "../../helpers/color.js";
8
+ //#region tests/browser/helpers/data/model/points/components.ts
9
+ const modelPointsMenuTestId = "modelPointsMenu";
10
+ function getModelPointsSection(window, section) {
11
+ return window.getByTestId(section).filter({ visible: true }).first();
12
+ }
13
+ const SECTION_TABS = {
14
+ modelPointsComponentsOptions: "components",
15
+ modelPointsComponentTypeOptions: "type",
16
+ modelPointsComponentOptions: "component"
17
+ };
18
+ async function setModelComponentsPointsVisibility(window, section, visibility) {
19
+ await ensureMenuOpen(window, modelPointsMenuTestId);
20
+ await ensureFeatureVisible(window, modelPointsMenuTestId);
21
+ await selectModelTab(window, SECTION_TABS[section]);
22
+ const visibilitySwitch = getModelPointsSection(window, section).getByTestId("modelComponentPointsVisibilitySwitch").getByRole("checkbox");
23
+ if (await visibilitySwitch.isChecked() !== visibility) {
24
+ await visibilitySwitch.setChecked(visibility, { force: true });
25
+ await waitForActionSettled(window);
26
+ }
27
+ }
28
+ async function setModelComponentsPointsSize(window, section, value) {
29
+ await setModelComponentsPointsVisibility(window, section, true);
30
+ await getModelPointsSection(window, section).getByTestId("modelComponentPointsSizeSlider").locator("input").first().evaluate((node, val) => {
31
+ node.value = val;
32
+ node.dispatchEvent(new Event("input", { bubbles: true }));
33
+ node.dispatchEvent(new Event("change", { bubbles: true }));
34
+ }, value.toString());
35
+ await waitForActionSettled(window);
36
+ }
37
+ async function setModelComponentsPointsColor(window, section) {
38
+ await setModelComponentsPointsVisibility(window, section, true);
39
+ await setColor(window, modelPointsMenuTestId, getModelPointsSection(window, section));
40
+ }
41
+ async function setModelComponentsPointsVertexAttribute(window, section, attributeName, options = {}) {
42
+ await setModelComponentsPointsVisibility(window, section, true);
43
+ await applyAttribute(window, getModelPointsSection(window, section), {
44
+ attributeType: vertexAttributeType,
45
+ attributeName,
46
+ ...options
47
+ });
48
+ }
49
+ //#endregion
50
+ export { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility };
@@ -0,0 +1,3 @@
1
+ import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "./components.js";
2
+ import { setModelPointsVisibility } from "./visibility.js";
3
+ export { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility, setModelPointsVisibility };
@@ -0,0 +1,9 @@
1
+ import { modelViewerObjectType } from "../../../constants.js";
2
+ import { setPointsVisibility } from "../../../viewer_menu.js";
3
+ import "../../../viewer_interaction.js";
4
+ //#region tests/browser/helpers/data/model/points/visibility.ts
5
+ async function setModelPointsVisibility(window, visibility) {
6
+ await setPointsVisibility(window, modelViewerObjectType, visibility);
7
+ }
8
+ //#endregion
9
+ export { setModelPointsVisibility };
@@ -0,0 +1,10 @@
1
+ import { selectModelOptionsTab } from "../../model_tabs.js";
2
+ import { ensureMenuOpen } from "../../viewer_menu.js";
3
+ import "../../viewer_interaction.js";
4
+ //#region tests/browser/helpers/data/model/style_menu.ts
5
+ async function showModelStyleOptions(window) {
6
+ await ensureMenuOpen(window, "modelStyleMenu");
7
+ await selectModelOptionsTab(window);
8
+ }
9
+ //#endregion
10
+ export { showModelStyleOptions };
@@ -0,0 +1,2 @@
1
+ import { setModelSurfacesVisibility } from "./visibility.js";
2
+ export { setModelSurfacesVisibility };
@@ -0,0 +1,8 @@
1
+ import { setVisibilityGeneric } from "../../../viewer_menu.js";
2
+ import "../../../viewer_interaction.js";
3
+ //#region tests/browser/helpers/data/model/surfaces/visibility.ts
4
+ async function setModelSurfacesVisibility(window, visibility) {
5
+ await setVisibilityGeneric(window, "modelStyleMenu", "modelSurfacesVisibilitySwitch", visibility);
6
+ }
7
+ //#endregion
8
+ export { setModelSurfacesVisibility };
@@ -0,0 +1,35 @@
1
+ import { waitForActionSettled } from "./wait_for_action_settled.js";
2
+ //#region tests/browser/helpers/model_tabs.ts
3
+ const MODEL_TAB_SWITCHES = /* @__PURE__ */ new Set([
4
+ "modelStyleVisibilitySwitch",
5
+ "modelEdgesVisibilitySwitch",
6
+ "modelPointsVisibilitySwitch"
7
+ ]);
8
+ const COMPONENT_TYPE_TAB_SWITCHES = /* @__PURE__ */ new Set([
9
+ "modelSurfacesVisibilitySwitch",
10
+ "modelLinesVisibilitySwitch",
11
+ "modelCornersVisibilitySwitch",
12
+ "modelBlocksVisibilitySwitch"
13
+ ]);
14
+ async function selectModelTab(window, tab) {
15
+ const tabButton = window.getByTestId(`modelTab_${tab}`).filter({ visible: true }).first();
16
+ if (await tabButton.isVisible()) {
17
+ await tabButton.click();
18
+ await waitForActionSettled(window);
19
+ }
20
+ }
21
+ async function selectModelOptionsTab(window) {
22
+ await selectModelTab(window, await window.getByTestId("modelTab_type").filter({ visible: true }).first().isVisible() ? "type" : "components");
23
+ }
24
+ async function getActiveModelTabTestId(window) {
25
+ const activeTab = window.locator("[data-testid^=\"modelTab_\"].v-btn--active").filter({ visible: true }).first();
26
+ if (await activeTab.count() === 0) return;
27
+ return await activeTab.getAttribute("data-testid") ?? void 0;
28
+ }
29
+ async function restoreModelTab(window, tabTestId) {
30
+ if (tabTestId === void 0) return;
31
+ await window.getByTestId(tabTestId).filter({ visible: true }).first().click();
32
+ await waitForActionSettled(window);
33
+ }
34
+ //#endregion
35
+ export { COMPONENT_TYPE_TAB_SWITCHES, MODEL_TAB_SWITCHES, getActiveModelTabTestId, restoreModelTab, selectModelOptionsTab, selectModelTab };
@@ -0,0 +1,122 @@
1
+ import { waitForActionSettled } from "../wait_for_action_settled.js";
2
+ import { closeAllMenus, moveMouseOutOfTheWay } from "../app_interaction.js";
3
+ //#region tests/browser/helpers/object_trees/common.ts
4
+ async function clickCollapseOrExpandAll(window, tree, expectedIcon) {
5
+ const btn = tree.getByTestId("CollapseOrExpandAll");
6
+ if (await btn.locator(`.${expectedIcon}`).isVisible()) {
7
+ await btn.click();
8
+ await moveMouseOutOfTheWay(window);
9
+ await waitForActionSettled(window);
10
+ }
11
+ }
12
+ async function collapseTreeGroup(window, tree, groupName) {
13
+ const collapseBtn = tree.getByTestId("treeRowWrapper").filter({ hasText: groupName }).first().getByTestId("collapseTreeRowButton");
14
+ if (await collapseBtn.isVisible()) {
15
+ await collapseBtn.click();
16
+ await collapseBtn.waitFor({ state: "hidden" });
17
+ await waitForActionSettled(window);
18
+ }
19
+ }
20
+ async function toggleSortObjects(window) {
21
+ await window.getByTestId("sortObjectsButton").click();
22
+ await moveMouseOutOfTheWay(window);
23
+ await waitForActionSettled(window);
24
+ }
25
+ async function openFilterMenu(window, tree) {
26
+ await tree.getByTestId("filterObjectsButton").click();
27
+ await window.locator(".v-overlay-container [data-testid^='filterCheckbox-']").first().waitFor({ state: "attached" });
28
+ }
29
+ async function checkFilterCategory(window, categoryId) {
30
+ const checkbox = window.getByTestId(`filterCheckbox-${categoryId}`).getByRole("checkbox");
31
+ await checkbox.waitFor({ state: "attached" });
32
+ await checkbox.check();
33
+ await waitForActionSettled(window);
34
+ }
35
+ async function uncheckFilterCategory(window, categoryId) {
36
+ const checkbox = window.getByTestId(`filterCheckbox-${categoryId}`).getByRole("checkbox");
37
+ await checkbox.waitFor({ state: "attached" });
38
+ await checkbox.uncheck();
39
+ await waitForActionSettled(window);
40
+ }
41
+ async function toggleSearchObjects(window) {
42
+ await window.getByTestId("searchObjectsButton").click();
43
+ await waitForActionSettled(window);
44
+ }
45
+ async function fillSearchQuery(window, query, tree) {
46
+ await tree.getByTestId("searchObjectsInput").locator("input").fill(query);
47
+ await moveMouseOutOfTheWay(window);
48
+ await waitForActionSettled(window);
49
+ }
50
+ async function getTreeRowByTextAndParent(window, geodeObjectType, dataName, tree) {
51
+ const parentRow = tree.getByTestId("treeRowWrapper").filter({
52
+ hasText: geodeObjectType,
53
+ hasNot: window.locator(".leaf-row")
54
+ }).first();
55
+ await parentRow.waitFor({ state: "attached" });
56
+ if (dataName === void 0 || dataName === "") return parentRow;
57
+ const allRows = tree.getByTestId("treeRowWrapper");
58
+ const childIndex = await allRows.evaluateAll((rows, { type, name }) => {
59
+ const parentIndex = rows.findIndex((row) => row.textContent.includes(type) && !row.classList.contains("leaf-row"));
60
+ if (parentIndex === -1) return -1;
61
+ for (let j = parentIndex + 1; j < rows.length; j += 1) {
62
+ const row = rows[j];
63
+ if (row === void 0) break;
64
+ if (row.textContent.includes(name)) return j;
65
+ if (!row.classList.contains("leaf-row")) break;
66
+ }
67
+ return -1;
68
+ }, {
69
+ type: geodeObjectType,
70
+ name: dataName
71
+ });
72
+ if (childIndex === -1) throw new Error(`Could not find child "${dataName}" under parent "${geodeObjectType}"`);
73
+ return allRows.nth(childIndex);
74
+ }
75
+ async function expandGeodeObjectTypeInTree(window, geodeObjectType, tree) {
76
+ await closeAllMenus(window);
77
+ const expandButton = (await getTreeRowByTextAndParent(window, geodeObjectType, void 0, tree)).getByTestId("expandTreeRowButton").first();
78
+ if (await expandButton.isVisible()) {
79
+ await expandButton.click();
80
+ await waitForActionSettled(window);
81
+ }
82
+ }
83
+ async function collapseGeodeObjectTypeInTree(window, geodeObjectType, tree) {
84
+ const collapseButton = (await getTreeRowByTextAndParent(window, geodeObjectType, void 0, tree)).getByTestId("collapseTreeRowButton").first();
85
+ if (await collapseButton.isVisible()) {
86
+ await collapseButton.click({ force: true });
87
+ await waitForActionSettled(window);
88
+ }
89
+ }
90
+ async function getTreeRowId(rowDataTestIdLocator, objectName) {
91
+ const dataTestId = await rowDataTestIdLocator.getAttribute("data-testid");
92
+ if (dataTestId === null) throw new Error(`Could not find a "data-testid" attribute for row "${objectName}"`);
93
+ return dataTestId.replace("treeRow-", "");
94
+ }
95
+ async function copyTreeRowId(window, parentName, objectName, tree) {
96
+ const row = await getTreeRowByTextAndParent(window, parentName, objectName, tree);
97
+ const label = row.getByTestId("treeItemLabel").first();
98
+ const id = await getTreeRowId(row.locator("[data-testid^=\"treeRow-\"]").first(), objectName);
99
+ await label.hover();
100
+ await waitForActionSettled(window);
101
+ const copyBtn = window.locator(".v-overlay--active").getByTestId("copyIdBtn");
102
+ await copyBtn.hover();
103
+ await copyBtn.click();
104
+ await waitForActionSettled(window);
105
+ return id;
106
+ }
107
+ async function hideObjectInTree(window, parentName, objectName, tree) {
108
+ const row = await getTreeRowByTextAndParent(window, parentName, objectName, tree);
109
+ await row.waitFor({ state: "attached" });
110
+ const btn = row.getByTestId("visibleObjectEyeButton").first();
111
+ if (await btn.isVisible()) {
112
+ await btn.click({ force: true });
113
+ await moveMouseOutOfTheWay(window);
114
+ await waitForActionSettled(window);
115
+ }
116
+ }
117
+ async function openObjectTreeContextMenu(window, objectName, tree) {
118
+ await (await getTreeRowByTextAndParent(window, objectName, void 0, tree)).click({ button: "right" });
119
+ await waitForActionSettled(window);
120
+ }
121
+ //#endregion
122
+ export { checkFilterCategory, clickCollapseOrExpandAll, collapseGeodeObjectTypeInTree, collapseTreeGroup, copyTreeRowId, expandGeodeObjectTypeInTree, fillSearchQuery, getTreeRowByTextAndParent, getTreeRowId, hideObjectInTree, openFilterMenu, openObjectTreeContextMenu, toggleSearchObjects, toggleSortObjects, uncheckFilterCategory };