vease 1.55.1-rc.3 → 1.56.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build/tests/e2e/utils/data/index.js +2 -2
- package/.build/tests/e2e/utils/data/model/index.js +2 -2
- package/.build/tests/e2e/utils/data/model/points/components.js +42 -0
- package/.build/tests/e2e/utils/data/model/points/index.js +2 -2
- package/package.json +1 -1
- package/tests/e2e/utils/data/model/points/components.ts +89 -0
- package/tests/e2e/utils/data/model/points/index.ts +1 -1
- package/.build/tests/e2e/utils/data/model/points/size.js +0 -8
- package/tests/e2e/utils/data/model/points/size.ts +0 -9
|
@@ -20,8 +20,8 @@ import "./mesh/index.js";
|
|
|
20
20
|
import { setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor } from "./model/attribute.js";
|
|
21
21
|
import { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelEdgesColorInput, setModelOpacity, setModelPointsColorInput, setModelPolygonsColorInput, setModelPolyhedraColorInput } from "./model/color.js";
|
|
22
22
|
import { setModelEdgesVisibility } from "./model/edges/visibility.js";
|
|
23
|
-
import {
|
|
23
|
+
import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "./model/points/components.js";
|
|
24
24
|
import { setModelPointsVisibility } from "./model/points/visibility.js";
|
|
25
25
|
import { setModelSurfacesVisibility } from "./model/surfaces/visibility.js";
|
|
26
26
|
import "./model/index.js";
|
|
27
|
-
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, setModelEdgesColorInput, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelEdgesVisibility, setModelOpacity, setModelPointsColorInput,
|
|
27
|
+
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, setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility, setModelEdgesColorInput, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelEdgesVisibility, setModelOpacity, setModelPointsColorInput, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPointsVisibility, setModelPolygonsColorInput, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraColorInput, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor, setModelSurfacesVisibility };
|
|
@@ -2,9 +2,9 @@ import { setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelEdges
|
|
|
2
2
|
import { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelEdgesColorInput, setModelOpacity, setModelPointsColorInput, setModelPolygonsColorInput, setModelPolyhedraColorInput } from "./color.js";
|
|
3
3
|
import { setModelEdgesVisibility } from "./edges/visibility.js";
|
|
4
4
|
import "./edges/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "./points/components.js";
|
|
6
6
|
import { setModelPointsVisibility } from "./points/visibility.js";
|
|
7
7
|
import "./points/index.js";
|
|
8
8
|
import { setModelSurfacesVisibility } from "./surfaces/visibility.js";
|
|
9
9
|
import "./surfaces/index.js";
|
|
10
|
-
export { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelEdgesColorInput, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelEdgesVisibility, setModelOpacity, setModelPointsColorInput,
|
|
10
|
+
export { copyModelEdgesColor, copyModelPointsColor, copyModelPolygonsColor, copyModelPolyhedraColor, pasteModelEdgesColorInput, pasteModelPointsColorInput, pasteModelPolygonsColorInput, pasteModelPolyhedraColorInput, setModelCellsCellAttribute, setModelCellsVertexAttribute, setModelColor, setModelColorWithSlider, setModelColoringStyle, setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility, setModelEdgesColorInput, setModelEdgesEdgeAttribute, setModelEdgesVertexAttribute, setModelEdgesVertexAttributeNoDataColor, setModelEdgesVisibility, setModelOpacity, setModelPointsColorInput, setModelPointsVertexAttribute, setModelPointsVertexAttributeNoDataColor, setModelPointsVisibility, setModelPolygonsColorInput, setModelPolygonsPolygonAttribute, setModelPolygonsVertexAttribute, setModelPolygonsVertexAttributeNoDataColor, setModelPolyhedraColorInput, setModelPolyhedraPolyhedronAttribute, setModelPolyhedraVertexAttribute, setModelPolyhedraVertexAttributeNoDataColor, setModelSurfacesVisibility };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { vertexAttributeType } from "../../../constants.js";
|
|
2
|
+
import { waitForActionSettled } from "../../../wait_for_action_settled.js";
|
|
3
|
+
import { ensureFeatureVisible, ensureMenuOpen } from "../../../viewer_interaction.js";
|
|
4
|
+
import { applyAttribute } from "../../helpers/attribute.js";
|
|
5
|
+
import { setColor } from "../../helpers/color.js";
|
|
6
|
+
//#region tests/e2e/utils/data/model/points/components.ts
|
|
7
|
+
const modelPointsMenuTestId = "modelPointsMenu";
|
|
8
|
+
function getModelPointsSection(window, section) {
|
|
9
|
+
return window.getByTestId(section).filter({ visible: true }).first();
|
|
10
|
+
}
|
|
11
|
+
async function setModelComponentsPointsVisibility(window, section, visibility) {
|
|
12
|
+
await ensureMenuOpen(window, modelPointsMenuTestId);
|
|
13
|
+
await ensureFeatureVisible(window, modelPointsMenuTestId);
|
|
14
|
+
const visibilitySwitch = getModelPointsSection(window, section).getByTestId("modelComponentPointsVisibilitySwitch").getByRole("checkbox");
|
|
15
|
+
if (await visibilitySwitch.isChecked() !== visibility) {
|
|
16
|
+
await visibilitySwitch.setChecked(visibility, { force: true });
|
|
17
|
+
await waitForActionSettled(window);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function setModelComponentsPointsSize(window, section, value) {
|
|
21
|
+
await setModelComponentsPointsVisibility(window, section, true);
|
|
22
|
+
await getModelPointsSection(window, section).getByTestId("modelComponentPointsSizeSlider").locator("input").first().evaluate((node, val) => {
|
|
23
|
+
node.value = val;
|
|
24
|
+
node.dispatchEvent(new Event("input", { bubbles: true }));
|
|
25
|
+
node.dispatchEvent(new Event("change", { bubbles: true }));
|
|
26
|
+
}, value.toString());
|
|
27
|
+
await waitForActionSettled(window);
|
|
28
|
+
}
|
|
29
|
+
async function setModelComponentsPointsColor(window, section) {
|
|
30
|
+
await setModelComponentsPointsVisibility(window, section, true);
|
|
31
|
+
await setColor(window, modelPointsMenuTestId, getModelPointsSection(window, section));
|
|
32
|
+
}
|
|
33
|
+
async function setModelComponentsPointsVertexAttribute(window, section, attributeName, options = {}) {
|
|
34
|
+
await setModelComponentsPointsVisibility(window, section, true);
|
|
35
|
+
await applyAttribute(window, getModelPointsSection(window, section), {
|
|
36
|
+
attributeType: vertexAttributeType,
|
|
37
|
+
attributeName,
|
|
38
|
+
...options
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility } from "./components.js";
|
|
2
2
|
import { setModelPointsVisibility } from "./visibility.js";
|
|
3
|
-
export {
|
|
3
|
+
export { setModelComponentsPointsColor, setModelComponentsPointsSize, setModelComponentsPointsVertexAttribute, setModelComponentsPointsVisibility, setModelPointsVisibility };
|
package/package.json
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Locator, Page } from "@playwright/test";
|
|
2
|
+
import { ensureFeatureVisible, ensureMenuOpen } from "@vease_tests/utils/viewer_interaction";
|
|
3
|
+
import { applyAttribute } from "@vease_tests/utils/data/helpers/attribute";
|
|
4
|
+
import { setColor } from "@vease_tests/utils/data/helpers/color";
|
|
5
|
+
import { vertexAttributeType } from "@vease_tests/utils/constants";
|
|
6
|
+
import { waitForActionSettled } from "@vease_tests/utils/wait_for_action_settled";
|
|
7
|
+
|
|
8
|
+
const modelPointsMenuTestId = "modelPointsMenu";
|
|
9
|
+
|
|
10
|
+
// Sections of the model points card, shown depending on what the context menu targets
|
|
11
|
+
type ModelPointsSection =
|
|
12
|
+
| "modelPointsComponentsOptions"
|
|
13
|
+
| "modelPointsComponentTypeOptions"
|
|
14
|
+
| "modelPointsComponentOptions";
|
|
15
|
+
|
|
16
|
+
interface AttributeOptions {
|
|
17
|
+
item?: number;
|
|
18
|
+
colorMap?: string;
|
|
19
|
+
min?: number | string;
|
|
20
|
+
max?: number | string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getModelPointsSection(window: Page, section: ModelPointsSection): Locator {
|
|
24
|
+
return window.getByTestId(section).filter({ visible: true }).first();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function setModelComponentsPointsVisibility(
|
|
28
|
+
window: Page,
|
|
29
|
+
section: ModelPointsSection,
|
|
30
|
+
visibility: boolean,
|
|
31
|
+
): Promise<void> {
|
|
32
|
+
await ensureMenuOpen(window, modelPointsMenuTestId);
|
|
33
|
+
await ensureFeatureVisible(window, modelPointsMenuTestId);
|
|
34
|
+
const visibilitySwitch = getModelPointsSection(window, section)
|
|
35
|
+
.getByTestId("modelComponentPointsVisibilitySwitch")
|
|
36
|
+
.getByRole("checkbox");
|
|
37
|
+
if ((await visibilitySwitch.isChecked()) !== visibility) {
|
|
38
|
+
await visibilitySwitch.setChecked(visibility, { force: true });
|
|
39
|
+
await waitForActionSettled(window);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function setModelComponentsPointsSize(
|
|
44
|
+
window: Page,
|
|
45
|
+
section: ModelPointsSection,
|
|
46
|
+
value: number,
|
|
47
|
+
): Promise<void> {
|
|
48
|
+
await setModelComponentsPointsVisibility(window, section, true);
|
|
49
|
+
await getModelPointsSection(window, section)
|
|
50
|
+
.getByTestId("modelComponentPointsSizeSlider")
|
|
51
|
+
.locator("input")
|
|
52
|
+
.first()
|
|
53
|
+
.evaluate((node: HTMLInputElement, val: string) => {
|
|
54
|
+
node.value = val;
|
|
55
|
+
node.dispatchEvent(new Event("input", { bubbles: true }));
|
|
56
|
+
node.dispatchEvent(new Event("change", { bubbles: true }));
|
|
57
|
+
}, value.toString());
|
|
58
|
+
await waitForActionSettled(window);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function setModelComponentsPointsColor(
|
|
62
|
+
window: Page,
|
|
63
|
+
section: ModelPointsSection,
|
|
64
|
+
): Promise<void> {
|
|
65
|
+
await setModelComponentsPointsVisibility(window, section, true);
|
|
66
|
+
await setColor(window, modelPointsMenuTestId, getModelPointsSection(window, section));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function setModelComponentsPointsVertexAttribute(
|
|
70
|
+
window: Page,
|
|
71
|
+
section: ModelPointsSection,
|
|
72
|
+
attributeName: string,
|
|
73
|
+
options: AttributeOptions = {},
|
|
74
|
+
): Promise<void> {
|
|
75
|
+
await setModelComponentsPointsVisibility(window, section, true);
|
|
76
|
+
await applyAttribute(window, getModelPointsSection(window, section), {
|
|
77
|
+
attributeType: vertexAttributeType,
|
|
78
|
+
attributeName,
|
|
79
|
+
...options,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
setModelComponentsPointsColor,
|
|
85
|
+
setModelComponentsPointsSize,
|
|
86
|
+
setModelComponentsPointsVertexAttribute,
|
|
87
|
+
setModelComponentsPointsVisibility,
|
|
88
|
+
};
|
|
89
|
+
export type { ModelPointsSection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./components";
|
|
2
2
|
export * from "./visibility";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { modelViewerObjectType } from "../../../constants.js";
|
|
2
|
-
import { setPointsSize } from "../../../viewer_interaction.js";
|
|
3
|
-
//#region tests/e2e/utils/data/model/points/size.ts
|
|
4
|
-
async function setModelPointsSize(window, value) {
|
|
5
|
-
await setPointsSize(window, modelViewerObjectType, value);
|
|
6
|
-
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { setModelPointsSize };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Page } from "@playwright/test";
|
|
2
|
-
import { modelViewerObjectType } from "@vease_tests/utils/constants";
|
|
3
|
-
import { setPointsSize } from "@vease_tests/utils/viewer_interaction";
|
|
4
|
-
|
|
5
|
-
async function setModelPointsSize(window: Page, value: number): Promise<void> {
|
|
6
|
-
await setPointsSize(window, modelViewerObjectType, value);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { setModelPointsSize };
|