@geode/opengeodeweb-front 11.0.1-rc.1 → 11.1.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build/shared/utils/response_handlers/load.js +5 -19
- package/.build/tests/browser/helpers/app_interaction.js +24 -0
- package/.build/tests/browser/helpers/basemap.js +55 -0
- package/.build/tests/browser/helpers/camera_filters.js +105 -0
- package/.build/tests/browser/helpers/camera_interaction.js +107 -0
- package/.build/tests/browser/helpers/camera_tools.js +43 -0
- package/.build/tests/browser/helpers/clipping_planes_interaction.js +80 -0
- package/.build/tests/browser/helpers/constants.js +43 -0
- package/.build/tests/browser/helpers/data/constants.js +26 -0
- package/.build/tests/browser/helpers/data/helpers/attribute.js +85 -0
- package/.build/tests/browser/helpers/data/helpers/attribute_colors.js +47 -0
- package/.build/tests/browser/helpers/data/helpers/attribute_menu.js +13 -0
- package/.build/tests/browser/helpers/data/helpers/color.js +98 -0
- package/.build/tests/browser/helpers/data/helpers/color_picker.js +52 -0
- package/.build/tests/browser/helpers/data/helpers/textures.js +26 -0
- package/.build/tests/browser/helpers/data/index.js +28 -0
- package/.build/tests/browser/helpers/data/mesh/cells/attribute.js +43 -0
- package/.build/tests/browser/helpers/data/mesh/cells/color.js +26 -0
- package/.build/tests/browser/helpers/data/mesh/cells/index.js +4 -0
- package/.build/tests/browser/helpers/data/mesh/cells/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/mesh/edges/attribute.js +43 -0
- package/.build/tests/browser/helpers/data/mesh/edges/color.js +26 -0
- package/.build/tests/browser/helpers/data/mesh/edges/index.js +5 -0
- package/.build/tests/browser/helpers/data/mesh/edges/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/mesh/edges/width.js +9 -0
- package/.build/tests/browser/helpers/data/mesh/index.js +24 -0
- package/.build/tests/browser/helpers/data/mesh/points/attribute.js +31 -0
- package/.build/tests/browser/helpers/data/mesh/points/color.js +26 -0
- package/.build/tests/browser/helpers/data/mesh/points/index.js +5 -0
- package/.build/tests/browser/helpers/data/mesh/points/size.js +9 -0
- package/.build/tests/browser/helpers/data/mesh/points/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/mesh/polygon/attribute.js +47 -0
- package/.build/tests/browser/helpers/data/mesh/polygon/color.js +26 -0
- package/.build/tests/browser/helpers/data/mesh/polygon/index.js +5 -0
- package/.build/tests/browser/helpers/data/mesh/polygon/test_texture.png +0 -0
- package/.build/tests/browser/helpers/data/mesh/polygon/textures.js +14 -0
- package/.build/tests/browser/helpers/data/mesh/polygon/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/mesh/polyhedra/attribute.js +43 -0
- package/.build/tests/browser/helpers/data/mesh/polyhedra/color.js +29 -0
- package/.build/tests/browser/helpers/data/mesh/polyhedra/index.js +4 -0
- package/.build/tests/browser/helpers/data/mesh/polyhedra/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/model/attribute.js +99 -0
- package/.build/tests/browser/helpers/data/model/color.js +69 -0
- package/.build/tests/browser/helpers/data/model/edges/components.js +50 -0
- package/.build/tests/browser/helpers/data/model/edges/index.js +3 -0
- package/.build/tests/browser/helpers/data/model/edges/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/model/index.js +11 -0
- package/.build/tests/browser/helpers/data/model/points/components.js +50 -0
- package/.build/tests/browser/helpers/data/model/points/index.js +3 -0
- package/.build/tests/browser/helpers/data/model/points/visibility.js +9 -0
- package/.build/tests/browser/helpers/data/model/style_menu.js +10 -0
- package/.build/tests/browser/helpers/data/model/surfaces/index.js +2 -0
- package/.build/tests/browser/helpers/data/model/surfaces/visibility.js +8 -0
- package/.build/tests/browser/helpers/model_tabs.js +35 -0
- package/.build/tests/browser/helpers/object_trees/common.js +122 -0
- package/.build/tests/browser/helpers/object_trees/main_object_tree.js +86 -0
- package/.build/tests/browser/helpers/object_trees/model_components_object_tree.js +111 -0
- package/.build/tests/browser/helpers/other.js +13 -0
- package/.build/tests/browser/helpers/viewer_canvas.js +83 -0
- package/.build/tests/browser/helpers/viewer_interaction.js +87 -0
- package/.build/tests/browser/helpers/viewer_menu.js +98 -0
- package/.build/tests/browser/helpers/wait_for_action_settled.js +63 -0
- package/app/components/MissingFilesSelector.vue +21 -12
- package/app/components/ObjectSelector.vue +33 -35
- package/package.json +20 -4
- package/shared/utils/response_handlers/load.ts +17 -56
- package/tests/browser/helpers/app_interaction.ts +35 -0
- package/tests/browser/helpers/basemap.ts +89 -0
- package/tests/browser/helpers/camera_filters.ts +176 -0
- package/tests/browser/helpers/camera_interaction.ts +179 -0
- package/tests/browser/helpers/camera_tools.ts +62 -0
- package/tests/browser/helpers/clipping_planes_interaction.ts +126 -0
- package/tests/browser/helpers/constants.ts +100 -0
- package/tests/browser/helpers/data/constants.ts +58 -0
- package/tests/browser/helpers/data/helpers/attribute.ts +152 -0
- package/tests/browser/helpers/data/helpers/attribute_colors.ts +79 -0
- package/tests/browser/helpers/data/helpers/attribute_menu.ts +19 -0
- package/tests/browser/helpers/data/helpers/color.ts +214 -0
- package/tests/browser/helpers/data/helpers/color_picker.ts +82 -0
- package/tests/browser/helpers/data/helpers/textures.ts +41 -0
- package/tests/browser/helpers/data/index.ts +2 -0
- package/tests/browser/helpers/data/mesh/cells/attribute.ts +103 -0
- package/tests/browser/helpers/data/mesh/cells/color.ts +52 -0
- package/tests/browser/helpers/data/mesh/cells/index.ts +3 -0
- package/tests/browser/helpers/data/mesh/cells/visibility.ts +9 -0
- package/tests/browser/helpers/data/mesh/edges/attribute.ts +103 -0
- package/tests/browser/helpers/data/mesh/edges/color.ts +52 -0
- package/tests/browser/helpers/data/mesh/edges/index.ts +4 -0
- package/tests/browser/helpers/data/mesh/edges/visibility.ts +9 -0
- package/tests/browser/helpers/data/mesh/edges/width.ts +9 -0
- package/tests/browser/helpers/data/mesh/index.ts +6 -0
- package/tests/browser/helpers/data/mesh/points/attribute.ts +66 -0
- package/tests/browser/helpers/data/mesh/points/color.ts +52 -0
- package/tests/browser/helpers/data/mesh/points/index.ts +4 -0
- package/tests/browser/helpers/data/mesh/points/size.ts +9 -0
- package/tests/browser/helpers/data/mesh/points/visibility.ts +9 -0
- package/tests/browser/helpers/data/mesh/polygon/attribute.ts +110 -0
- package/tests/browser/helpers/data/mesh/polygon/color.ts +52 -0
- package/tests/browser/helpers/data/mesh/polygon/index.ts +4 -0
- package/tests/browser/helpers/data/mesh/polygon/test_texture.png +0 -0
- package/tests/browser/helpers/data/mesh/polygon/textures.ts +21 -0
- package/tests/browser/helpers/data/mesh/polygon/visibility.ts +9 -0
- package/tests/browser/helpers/data/mesh/polyhedra/attribute.ts +103 -0
- package/tests/browser/helpers/data/mesh/polyhedra/color.ts +58 -0
- package/tests/browser/helpers/data/mesh/polyhedra/index.ts +3 -0
- package/tests/browser/helpers/data/mesh/polyhedra/visibility.ts +9 -0
- package/tests/browser/helpers/data/model/attribute.ts +180 -0
- package/tests/browser/helpers/data/model/color.ts +110 -0
- package/tests/browser/helpers/data/model/edges/components.ts +97 -0
- package/tests/browser/helpers/data/model/edges/index.ts +2 -0
- package/tests/browser/helpers/data/model/edges/visibility.ts +9 -0
- package/tests/browser/helpers/data/model/index.ts +5 -0
- package/tests/browser/helpers/data/model/points/components.ts +97 -0
- package/tests/browser/helpers/data/model/points/index.ts +2 -0
- package/tests/browser/helpers/data/model/points/visibility.ts +9 -0
- package/tests/browser/helpers/data/model/style_menu.ts +11 -0
- package/tests/browser/helpers/data/model/surfaces/index.ts +1 -0
- package/tests/browser/helpers/data/model/surfaces/visibility.ts +8 -0
- package/tests/browser/helpers/model_tabs.ts +61 -0
- package/tests/browser/helpers/object_trees/common.ts +212 -0
- package/tests/browser/helpers/object_trees/main_object_tree.ts +167 -0
- package/tests/browser/helpers/object_trees/model_components_object_tree.ts +219 -0
- package/tests/browser/helpers/other.ts +15 -0
- package/tests/browser/helpers/viewer_canvas.ts +136 -0
- package/tests/browser/helpers/viewer_interaction.ts +96 -0
- package/tests/browser/helpers/viewer_menu.ts +205 -0
- package/tests/browser/helpers/wait_for_action_settled.ts +108 -0
|
@@ -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/browser/helpers/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/browser/helpers/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 };
|
|
@@ -0,0 +1,98 @@
|
|
|
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/browser/helpers/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 };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { waitForActionSettled } from "../../wait_for_action_settled.js";
|
|
2
|
+
import { moveMouseOutOfTheWay } from "../../app_interaction.js";
|
|
3
|
+
//#region tests/browser/helpers/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 };
|
|
@@ -0,0 +1,26 @@
|
|
|
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/browser/helpers/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 };
|
|
@@ -0,0 +1,28 @@
|
|
|
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 };
|
|
@@ -0,0 +1,43 @@
|
|
|
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/browser/helpers/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 };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cellsFeatureName, meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setFeatureColor, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput } from "../../helpers/color.js";
|
|
3
|
+
//#region tests/browser/helpers/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 };
|
|
@@ -0,0 +1,4 @@
|
|
|
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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setCellsVisibility } from "../../../viewer_menu.js";
|
|
3
|
+
import "../../../viewer_interaction.js";
|
|
4
|
+
//#region tests/browser/helpers/data/mesh/cells/visibility.ts
|
|
5
|
+
async function setMeshCellsVisibility(window, visibility) {
|
|
6
|
+
await setCellsVisibility(window, meshViewerObjectType, visibility);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { setMeshCellsVisibility };
|
|
@@ -0,0 +1,43 @@
|
|
|
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/browser/helpers/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 };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { edgesFeatureName, meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setFeatureColor, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput } from "../../helpers/color.js";
|
|
3
|
+
//#region tests/browser/helpers/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 };
|
|
@@ -0,0 +1,5 @@
|
|
|
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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setEdgesVisibility } from "../../../viewer_menu.js";
|
|
3
|
+
import "../../../viewer_interaction.js";
|
|
4
|
+
//#region tests/browser/helpers/data/mesh/edges/visibility.ts
|
|
5
|
+
async function setMeshEdgesVisibility(window, visibility) {
|
|
6
|
+
await setEdgesVisibility(window, meshViewerObjectType, visibility);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { setMeshEdgesVisibility };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setEdgesWidth } from "../../../viewer_menu.js";
|
|
3
|
+
import "../../../viewer_interaction.js";
|
|
4
|
+
//#region tests/browser/helpers/data/mesh/edges/width.ts
|
|
5
|
+
async function setMeshEdgesWidth(window, value) {
|
|
6
|
+
await setEdgesWidth(window, meshViewerObjectType, value);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { setMeshEdgesWidth };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { openMeshCellsMenu, setMeshCellsCellAttribute, setMeshCellsColorMap, setMeshCellsItem, setMeshCellsNoDataColor, setMeshCellsVertexAttribute } from "./cells/attribute.js";
|
|
2
|
+
import { copyMeshCellsColor, pasteMeshCellsColorInput, setMeshCellsColor, setMeshCellsColorInput, setMeshCellsColorWithSlider, setMeshCellsColoringStyle, setMeshCellsOpacity } from "./cells/color.js";
|
|
3
|
+
import { setMeshCellsVisibility } from "./cells/visibility.js";
|
|
4
|
+
import "./cells/index.js";
|
|
5
|
+
import { openMeshEdgesMenu, setMeshEdgesColorMap, setMeshEdgesEdgeAttribute, setMeshEdgesItem, setMeshEdgesNoDataColor, setMeshEdgesVertexAttribute } from "./edges/attribute.js";
|
|
6
|
+
import { copyMeshEdgesColor, pasteMeshEdgesColorInput, setMeshEdgesColor, setMeshEdgesColorInput, setMeshEdgesColorWithSlider, setMeshEdgesColoringStyle, setMeshEdgesOpacity } from "./edges/color.js";
|
|
7
|
+
import { setMeshEdgesVisibility } from "./edges/visibility.js";
|
|
8
|
+
import { setMeshEdgesWidth } from "./edges/width.js";
|
|
9
|
+
import "./edges/index.js";
|
|
10
|
+
import { openMeshPointsMenu, setMeshPointsNoDataColor, setMeshPointsVertexAttribute } from "./points/attribute.js";
|
|
11
|
+
import { copyMeshPointsColor, pasteMeshPointsColorInput, setMeshPointsColor, setMeshPointsColorInput, setMeshPointsColorWithSlider, setMeshPointsColoringStyle, setMeshPointsOpacity } from "./points/color.js";
|
|
12
|
+
import { setMeshPointsSize } from "./points/size.js";
|
|
13
|
+
import { setMeshPointsVisibility } from "./points/visibility.js";
|
|
14
|
+
import "./points/index.js";
|
|
15
|
+
import { openMeshPolygonsMenu, setMeshPolygonsColorMap, setMeshPolygonsItem, setMeshPolygonsNoDataColor, setMeshPolygonsPolygonAttribute, setMeshPolygonsTimeStep, setMeshPolygonsVertexAttribute } from "./polygon/attribute.js";
|
|
16
|
+
import { copyMeshPolygonsColor, pasteMeshPolygonsColorInput, setMeshPolygonsColor, setMeshPolygonsColorInput, setMeshPolygonsColorWithSlider, setMeshPolygonsColoringStyle, setMeshPolygonsOpacity } from "./polygon/color.js";
|
|
17
|
+
import { setMeshPolygonsTextures } from "./polygon/textures.js";
|
|
18
|
+
import { setMeshPolygonsVisibility } from "./polygon/visibility.js";
|
|
19
|
+
import "./polygon/index.js";
|
|
20
|
+
import { openMeshPolyhedraMenu, setMeshPolyhedraColorMap, setMeshPolyhedraItem, setMeshPolyhedraNoDataColor, setMeshPolyhedraPolyhedronAttribute, setMeshPolyhedraVertexAttribute } from "./polyhedra/attribute.js";
|
|
21
|
+
import { copyMeshPolyhedraColor, pasteMeshPolyhedraColorInput, setMeshPolyhedraColor, setMeshPolyhedraColorBlack, setMeshPolyhedraColorInput, setMeshPolyhedraColorWithSlider, setMeshPolyhedraColoringStyle, setMeshPolyhedraOpacity } from "./polyhedra/color.js";
|
|
22
|
+
import { setMeshPolyhedraVisibility } from "./polyhedra/visibility.js";
|
|
23
|
+
import "./polyhedra/index.js";
|
|
24
|
+
export { copyMeshCellsColor, copyMeshEdgesColor, copyMeshPointsColor, copyMeshPolygonsColor, copyMeshPolyhedraColor, openMeshCellsMenu, openMeshEdgesMenu, openMeshPointsMenu, openMeshPolygonsMenu, openMeshPolyhedraMenu, pasteMeshCellsColorInput, pasteMeshEdgesColorInput, pasteMeshPointsColorInput, pasteMeshPolygonsColorInput, pasteMeshPolyhedraColorInput, 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 };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { meshViewerObjectType, pointsFeatureName, 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 { setFeatureAttribute } from "../../helpers/attribute.js";
|
|
8
|
+
//#region tests/browser/helpers/data/mesh/points/attribute.ts
|
|
9
|
+
async function setMeshPointsVertexAttribute(window, attributeName, options = {}) {
|
|
10
|
+
await setFeatureAttribute(window, meshViewerObjectType, pointsFeatureName, vertexAttributeType, attributeName, options);
|
|
11
|
+
}
|
|
12
|
+
async function openMeshPointsMenu(window) {
|
|
13
|
+
const menuTestId = `${meshViewerObjectType}${pointsFeatureName}Menu`;
|
|
14
|
+
await openStyleMenu(window, menuTestId);
|
|
15
|
+
}
|
|
16
|
+
async function setMeshPointsNoDataColor(window) {
|
|
17
|
+
const menuTestId = `${meshViewerObjectType}${pointsFeatureName}Menu`;
|
|
18
|
+
await ensureMenuOpen(window, menuTestId);
|
|
19
|
+
const noDataColorBtn = window.getByTestId("noDataColorBtn").first();
|
|
20
|
+
await noDataColorBtn.waitFor({ state: "visible" });
|
|
21
|
+
await noDataColorBtn.click();
|
|
22
|
+
await waitForActionSettled(window);
|
|
23
|
+
await window.getByTestId("colorPicker").filter({ visible: true }).first().waitFor({ state: "visible" });
|
|
24
|
+
await clickColorPickerSlider(window, SLIDER_PINK);
|
|
25
|
+
await clickColorPickerCanvas(window);
|
|
26
|
+
await noDataColorBtn.click();
|
|
27
|
+
await moveMouseOutOfTheWay(window);
|
|
28
|
+
await waitForActionSettled(window);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { openMeshPointsMenu, setMeshPointsNoDataColor, setMeshPointsVertexAttribute };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { meshViewerObjectType, pointsFeatureName } from "../../../constants.js";
|
|
2
|
+
import { setFeatureColor, setFeatureColorInput, setFeatureColorWithSlider, setFeatureColoringStyle, setFeatureCopyColor, setFeatureOpacity, setFeaturePasteColorInput } from "../../helpers/color.js";
|
|
3
|
+
//#region tests/browser/helpers/data/mesh/points/color.ts
|
|
4
|
+
async function setMeshPointsOpacity(window, percent) {
|
|
5
|
+
await setFeatureOpacity(window, meshViewerObjectType, pointsFeatureName, percent);
|
|
6
|
+
}
|
|
7
|
+
async function setMeshPointsColor(window) {
|
|
8
|
+
await setFeatureColor(window, meshViewerObjectType, pointsFeatureName);
|
|
9
|
+
}
|
|
10
|
+
async function setMeshPointsColorWithSlider(window) {
|
|
11
|
+
await setFeatureColorWithSlider(window, meshViewerObjectType, pointsFeatureName);
|
|
12
|
+
}
|
|
13
|
+
async function copyMeshPointsColor(window) {
|
|
14
|
+
await setFeatureCopyColor(window, meshViewerObjectType, pointsFeatureName);
|
|
15
|
+
}
|
|
16
|
+
async function setMeshPointsColorInput(window, colorText) {
|
|
17
|
+
await setFeatureColorInput(window, meshViewerObjectType, pointsFeatureName, colorText);
|
|
18
|
+
}
|
|
19
|
+
async function pasteMeshPointsColorInput(window, container = window) {
|
|
20
|
+
await setFeaturePasteColorInput(window, meshViewerObjectType, pointsFeatureName, container);
|
|
21
|
+
}
|
|
22
|
+
async function setMeshPointsColoringStyle(window, style) {
|
|
23
|
+
await setFeatureColoringStyle(window, meshViewerObjectType, pointsFeatureName, style);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { copyMeshPointsColor, pasteMeshPointsColorInput, setMeshPointsColor, setMeshPointsColorInput, setMeshPointsColorWithSlider, setMeshPointsColoringStyle, setMeshPointsOpacity };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { openMeshPointsMenu, setMeshPointsNoDataColor, setMeshPointsVertexAttribute } from "./attribute.js";
|
|
2
|
+
import { copyMeshPointsColor, pasteMeshPointsColorInput, setMeshPointsColor, setMeshPointsColorInput, setMeshPointsColorWithSlider, setMeshPointsColoringStyle, setMeshPointsOpacity } from "./color.js";
|
|
3
|
+
import { setMeshPointsSize } from "./size.js";
|
|
4
|
+
import { setMeshPointsVisibility } from "./visibility.js";
|
|
5
|
+
export { copyMeshPointsColor, openMeshPointsMenu, pasteMeshPointsColorInput, setMeshPointsColor, setMeshPointsColorInput, setMeshPointsColorWithSlider, setMeshPointsColoringStyle, setMeshPointsNoDataColor, setMeshPointsOpacity, setMeshPointsSize, setMeshPointsVertexAttribute, setMeshPointsVisibility };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setPointsSize } from "../../../viewer_menu.js";
|
|
3
|
+
import "../../../viewer_interaction.js";
|
|
4
|
+
//#region tests/browser/helpers/data/mesh/points/size.ts
|
|
5
|
+
async function setMeshPointsSize(window, value) {
|
|
6
|
+
await setPointsSize(window, meshViewerObjectType, value);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { setMeshPointsSize };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { meshViewerObjectType } from "../../../constants.js";
|
|
2
|
+
import { setPointsVisibility } from "../../../viewer_menu.js";
|
|
3
|
+
import "../../../viewer_interaction.js";
|
|
4
|
+
//#region tests/browser/helpers/data/mesh/points/visibility.ts
|
|
5
|
+
async function setMeshPointsVisibility(window, visibility) {
|
|
6
|
+
await setPointsVisibility(window, meshViewerObjectType, visibility);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { setMeshPointsVisibility };
|