@geode/opengeodeweb-front 10.14.0-rc.1 → 10.14.0-rc.3

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 (47) hide show
  1. package/.oxlintrc.json +4 -2
  2. package/app/components/Viewer/Options/ColorPicker.vue +28 -4
  3. package/app/utils/default_styles.js +9 -9
  4. package/app/utils/local/microservices.js +1 -1
  5. package/internal/utils/api_fetch.js +37 -25
  6. package/internal/utils/viewer_call.js +3 -3
  7. package/nuxt.config.js +0 -7
  8. package/package.json +1 -1
  9. package/tests/integration/setup.js +2 -0
  10. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +51 -46
  11. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +46 -40
  12. package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +12 -12
  13. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +37 -40
  14. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +48 -46
  15. package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +45 -42
  16. package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +15 -15
  17. package/tests/integration/stores/data_style/model/corners.nuxt.test.js +15 -15
  18. package/tests/integration/stores/data_style/model/edges.nuxt.test.js +12 -12
  19. package/tests/integration/stores/data_style/model/index.nuxt.test.js +10 -10
  20. package/tests/integration/stores/data_style/model/lines.nuxt.test.js +16 -15
  21. package/tests/integration/stores/data_style/model/points.nuxt.test.js +14 -14
  22. package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +11 -11
  23. package/tests/integration/stores/viewer.nuxt.test.js +9 -9
  24. package/tests/unit/components/CrsSelector.nuxt.test.js +9 -11
  25. package/tests/unit/components/ExtensionSelector.nuxt.test.js +12 -12
  26. package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +4 -3
  27. package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +4 -4
  28. package/tests/unit/components/FileSelector.nuxt.test.js +8 -8
  29. package/tests/unit/components/FileUploader.nuxt.test.js +5 -5
  30. package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +5 -15
  31. package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +3 -3
  32. package/tests/unit/components/MissingFilesSelector.nuxt.test.js +8 -10
  33. package/tests/unit/components/ObjectSelector.nuxt.test.js +20 -16
  34. package/tests/unit/components/PackagesVersions.nuxt.test.js +2 -2
  35. package/tests/unit/components/Step.nuxt.test.js +3 -8
  36. package/tests/unit/components/Stepper.nuxt.test.js +3 -8
  37. package/tests/unit/composables/project_manager.nuxt.test.js +22 -19
  38. package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +20 -20
  39. package/tests/unit/composables/upload_file.nuxt.test.js +6 -6
  40. package/tests/unit/plugins/project_load.nuxt.test.js +5 -5
  41. package/tests/unit/stores/app.nuxt.test.js +26 -24
  42. package/tests/unit/stores/cloud.nuxt.test.js +6 -7
  43. package/tests/unit/stores/feedback.nuxt.test.js +26 -23
  44. package/tests/unit/stores/geode.nuxt.test.js +5 -5
  45. package/tests/unit/stores/infra.nuxt.test.js +31 -23
  46. package/tests/unit/stores/treeview.nuxt.test.js +5 -4
  47. package/tests/unit/stores/viewer.nuxt.test.js +29 -24
package/.oxlintrc.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "eslint/id-length": [
26
26
  "error",
27
27
  {
28
- "exceptions": ["x", "y", "z", "i", "j", "k", "r", "g", "b", "id", "ID", "fs", "os", "_"],
28
+ "exceptions": ["x", "y", "z", "i", "j", "k", "id", "ID", "fs", "os", "_"],
29
29
  "min": 3
30
30
  }
31
31
  ],
@@ -123,7 +123,9 @@
123
123
  "vitest/prefer-to-be-truthy": "off",
124
124
  "vitest/prefer-to-be-falsy": "off",
125
125
  "vitest/require-test-timeout": "warn",
126
- "vitest/prefer-importing-vitest-globals": "off"
126
+ "vitest/prefer-importing-vitest-globals": "off",
127
+ "jest/consistent-test-it": ["error", { "fn": "test", "withinDescribe": "test" }],
128
+ "vitest/prefer-spy-on": "off"
127
129
  }
128
130
  },
129
131
  {
@@ -1,13 +1,37 @@
1
1
  <script setup>
2
+ // oxlint-disable id-length
2
3
  const colorPickerRef = useTemplateRef("colorPickerRef");
3
4
  const model = defineModel();
4
5
  const { pressed } = useMousePressed({ target: colorPickerRef });
5
6
 
6
- const color = ref(model);
7
+ const vuetifyColor = ref({
8
+ r: model.value.red,
9
+ g: model.value.green,
10
+ b: model.value.blue,
11
+ a: model.value.alpha,
12
+ });
13
+
14
+ watch(
15
+ model,
16
+ (newValue) => {
17
+ vuetifyColor.value = {
18
+ r: newValue.red,
19
+ g: newValue.green,
20
+ b: newValue.blue,
21
+ a: newValue.alpha,
22
+ };
23
+ },
24
+ { deep: true },
25
+ );
7
26
 
8
27
  watch(pressed, (value) => {
9
28
  if (!value) {
10
- model.value = color.value;
29
+ model.value = {
30
+ red: vuetifyColor.value.r,
31
+ green: vuetifyColor.value.g,
32
+ blue: vuetifyColor.value.b,
33
+ alpha: vuetifyColor.value.a,
34
+ };
11
35
  }
12
36
  });
13
37
  </script>
@@ -15,11 +39,11 @@ watch(pressed, (value) => {
15
39
  <template>
16
40
  <v-color-picker
17
41
  ref="colorPickerRef"
18
- v-model="color"
42
+ v-model="vuetifyColor"
19
43
  flat
20
44
  canvas-height="100"
21
45
  hide-inputs
22
46
  width="100%"
23
- mode="rgb"
47
+ mode="rgba"
24
48
  />
25
49
  </template>
@@ -5,21 +5,21 @@ const cells_defaultVisibility = true;
5
5
  const polygons_defaultVisibility = true;
6
6
  const polyhedra_defaultVisibility = true;
7
7
  const points_defaultSize = 10;
8
- const points_defaultColor = { r: 20, g: 20, b: 20 };
8
+ const points_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
9
9
  const edges_defaultWidth = 2;
10
- const edges_defaultColor = { r: 20, g: 20, b: 20 };
11
- const cells_defaultColor = { r: 255, g: 255, b: 255 };
12
- const polygons_defaultColor = { r: 255, g: 255, b: 255 };
13
- const polyhedra_defaultColor = { r: 255, g: 255, b: 255 };
10
+ const edges_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
11
+ const cells_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
12
+ const polygons_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
13
+ const polyhedra_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
14
14
 
15
15
  const corners_defaultVisibility = true;
16
- const corners_defaultColor = { r: 20, g: 20, b: 20 };
16
+ const corners_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
17
17
  const lines_defaultVisibility = true;
18
- const lines_defaultColor = { r: 20, g: 20, b: 20 };
18
+ const lines_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
19
19
  const surfaces_defaultVisibility = true;
20
- const surfaces_defaultColor = { r: 255, g: 255, b: 255 };
20
+ const surfaces_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
21
21
  const blocks_defaultVisibility = true;
22
- const blocks_defaultColor = { r: 255, g: 255, b: 255 };
22
+ const blocks_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
23
23
 
24
24
  const DEFAULT_MODEL_COMPONENT_TYPE_COLORS = {
25
25
  Corner: corners_defaultColor,
@@ -13,7 +13,7 @@ import { commandExistsSync, waitForReady } from "./scripts.js";
13
13
  import { executableName, executablePath } from "./path.js";
14
14
  import { microservicesMetadatasPath, projectMicroservices } from "./cleanup.js";
15
15
 
16
- const DEFAULT_TIMEOUT_SECONDS = 30;
16
+ const DEFAULT_TIMEOUT_SECONDS = 60;
17
17
  const MILLISECONDS_PER_SECOND = 1000;
18
18
 
19
19
  function getAvailablePort() {
@@ -7,7 +7,7 @@ const ERROR_400 = 400;
7
7
  export function api_fetch(
8
8
  microservice,
9
9
  { schema, params },
10
- { request_error_function, response_function, response_error_function } = {},
10
+ { request_error_function, response_function, response_error_function, timeout } = {},
11
11
  ) {
12
12
  const feedbackStore = useFeedbackStore();
13
13
 
@@ -36,30 +36,42 @@ export function api_fetch(
36
36
  if (schema.max_retry) {
37
37
  request_options.max_retry = schema.max_retry;
38
38
  }
39
- return $fetch(schema.$id, {
40
- baseURL: microservice.base_url,
41
- ...request_options,
42
- onRequestError({ error }) {
43
- microservice.stop_request();
44
- feedbackStore.add_error(error.code, schema.$id, error.message, error.stack);
45
- if (request_error_function) {
46
- request_error_function(error);
47
- }
48
- },
49
- onResponse({ response }) {
50
- if (response.ok) {
39
+
40
+ function performFetch() {
41
+ return $fetch(schema.$id, {
42
+ baseURL: microservice.base_url,
43
+ ...request_options,
44
+ onRequestError({ error }) {
45
+ microservice.stop_request();
46
+ feedbackStore.add_error(error.code, schema.$id, error.message, error.stack);
47
+ if (request_error_function) {
48
+ request_error_function(error);
49
+ }
50
+ },
51
+ onResponse({ response }) {
52
+ if (response.ok) {
53
+ microservice.stop_request();
54
+ if (response_function) {
55
+ response_function(response._data);
56
+ }
57
+ }
58
+ },
59
+ onResponseError({ response }) {
51
60
  microservice.stop_request();
52
- if (response_function) {
53
- response_function(response._data);
61
+ feedbackStore.add_error(response.status, schema.$id, response.name, response.description);
62
+ if (response_error_function) {
63
+ response_error_function(response);
54
64
  }
55
- }
56
- },
57
- onResponseError({ response }) {
58
- microservice.stop_request();
59
- feedbackStore.add_error(response.status, schema.$id, response.name, response.description);
60
- if (response_error_function) {
61
- response_error_function(response);
62
- }
63
- },
64
- });
65
+ },
66
+ });
67
+ }
68
+
69
+ if (timeout !== undefined && timeout > 0) {
70
+ return pTimeout(performCall(), {
71
+ milliseconds: timeout,
72
+ message: `${schema.$id}: Timed out after ${timeout}ms`,
73
+ });
74
+ }
75
+
76
+ return performFetch();
65
77
  }
@@ -4,7 +4,7 @@ import { validate_schema } from "@ogw_front/utils/validate_schema";
4
4
 
5
5
  const ERROR_400 = 400;
6
6
 
7
- export async function viewer_call(
7
+ export function viewer_call(
8
8
  microservice,
9
9
  { schema, params = {} },
10
10
  { request_error_function, response_function, response_error_function, timeout } = {},
@@ -50,11 +50,11 @@ export async function viewer_call(
50
50
  }
51
51
 
52
52
  if (timeout !== undefined && timeout > 0) {
53
- return await pTimeout(performCall(), {
53
+ return pTimeout(performCall(), {
54
54
  milliseconds: timeout,
55
55
  message: `${schema.$id}: Timed out after ${timeout}ms`,
56
56
  });
57
57
  }
58
58
 
59
- return await performCall();
59
+ return performCall();
60
60
  }
package/nuxt.config.js CHANGED
@@ -5,7 +5,6 @@ import path from "node:path";
5
5
  import package_json from "./package.json";
6
6
 
7
7
  const __dirname = import.meta.dirname;
8
- const oneMinute = 60_000;
9
8
 
10
9
  export default defineNuxtConfig({
11
10
  runtimeConfig: {
@@ -38,12 +37,6 @@ export default defineNuxtConfig({
38
37
  transpile: ["vuetify"],
39
38
  },
40
39
 
41
- nitro: {
42
- routeRules: {
43
- "/api/**": { timeout: oneMinute },
44
- },
45
- },
46
-
47
40
  vuetify: {
48
41
  vuetifyOptions: {
49
42
  defaults: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.14.0-rc.1",
3
+ "version": "10.14.0-rc.3",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {
@@ -1,3 +1,5 @@
1
+ // oxlint-disable vitest/require-top-level-describe
2
+
1
3
  // Node.js imports
2
4
  import { WebSocket } from "ws";
3
5
  import path from "node:path";
@@ -20,20 +20,20 @@ const cell_attribute = { name: "RGB_data" };
20
20
  let id = "",
21
21
  projectFolderPath = "";
22
22
 
23
- beforeAll(async () => {
24
- id = "";
25
- projectFolderPath = "";
26
- ({ id, projectFolderPath } = await setupIntegrationTests(file_name, geode_object));
27
- }, INTERVAL_TIMEOUT);
23
+ describe("mesh cells", () => {
24
+ beforeAll(async () => {
25
+ id = "";
26
+ projectFolderPath = "";
27
+ ({ id, projectFolderPath } = await setupIntegrationTests(file_name, geode_object));
28
+ }, INTERVAL_TIMEOUT);
28
29
 
29
- afterAll(async () => {
30
- console.log("afterAll mesh cells kill", projectFolderPath);
31
- await cleanupBackend(projectFolderPath);
32
- });
30
+ afterAll(async () => {
31
+ console.log("afterAll mesh cells kill", projectFolderPath);
32
+ await cleanupBackend(projectFolderPath);
33
+ });
33
34
 
34
- describe("Mesh cells", () => {
35
- describe("Cells visibility", () => {
36
- test("Visibility true", async () => {
35
+ describe("cells visibility", () => {
36
+ test("visibility true", async () => {
37
37
  const dataStyleStore = useDataStyleStore();
38
38
  const viewerStore = useViewerStore();
39
39
  const visibility = true;
@@ -53,11 +53,11 @@ describe("Mesh cells", () => {
53
53
  });
54
54
  });
55
55
 
56
- describe("Cells color", () => {
57
- test("Color red", async () => {
56
+ describe("cells color", () => {
57
+ test("color red", async () => {
58
58
  const dataStyleStore = useDataStyleStore();
59
59
  const viewerStore = useViewerStore();
60
- const color = { r: 255, g: 0, b: 0 };
60
+ const color = { red: 255, green: 0, blue: 0, alpha: 1 };
61
61
  const spy = vi.spyOn(viewerStore, "request");
62
62
  const result = dataStyleStore.setMeshCellsColor(id, color);
63
63
  expect(result).toBeInstanceOf(Promise);
@@ -74,8 +74,8 @@ describe("Mesh cells", () => {
74
74
  });
75
75
  });
76
76
 
77
- describe("Cells vertex attribute", () => {
78
- test("Coloring vertex attribute", async () => {
77
+ describe("cells vertex attribute", () => {
78
+ test("coloring vertex attribute", async () => {
79
79
  const dataStyleStore = useDataStyleStore();
80
80
  const viewerStore = useViewerStore();
81
81
  const spy = vi.spyOn(viewerStore, "request");
@@ -94,8 +94,8 @@ describe("Mesh cells", () => {
94
94
  });
95
95
  });
96
96
 
97
- describe("Cells cell attribute", () => {
98
- test("Coloring cell attribute", async () => {
97
+ describe("cells cell attribute", () => {
98
+ test("coloring cell attribute", async () => {
99
99
  const dataStyleStore = useDataStyleStore();
100
100
  const viewerStore = useViewerStore();
101
101
  const spy = vi.spyOn(viewerStore, "request");
@@ -114,39 +114,44 @@ describe("Mesh cells", () => {
114
114
  });
115
115
  });
116
116
 
117
- describe("Cells active coloring", () => {
118
- test("test coloring", async () => {
117
+ describe("cells active coloring", () => {
118
+ test("coloring color", async () => {
119
119
  const dataStyleStore = useDataStyleStore();
120
120
  const viewerStore = useViewerStore();
121
- const coloringTypes = [
122
- { name: "color" },
123
- {
124
- name: "vertex",
125
- function: () => dataStyleStore.setMeshCellsVertexAttributeName(id, vertex_attribute.name),
126
- },
127
- {
128
- name: "cell",
129
- function: () => dataStyleStore.setMeshCellsCellAttributeName(id, cell_attribute.name),
130
- },
131
- ];
132
- async function testColoring(coloringType, expectedColoringType) {
133
- if (coloringType.function) {
134
- await coloringType.function();
135
- }
136
- const result = dataStyleStore.setMeshCellsActiveColoring(id, coloringType.name);
137
- expect(result).toBeInstanceOf(Promise);
138
- await result;
139
- expect(dataStyleStore.meshCellsActiveColoring(id)).toBe(expectedColoringType);
140
- expect(viewerStore.status).toBe(Status.CONNECTED);
141
- }
121
+ const coloringName = "color";
122
+ const result = dataStyleStore.setMeshCellsActiveColoring(id, coloringName);
123
+ expect(result).toBeInstanceOf(Promise);
124
+ await result;
125
+ expect(dataStyleStore.meshCellsActiveColoring(id)).toBe(coloringName);
126
+ expect(viewerStore.status).toBe(Status.CONNECTED);
127
+ });
142
128
 
143
- await testColoring(coloringTypes[0], "color");
144
- await testColoring(coloringTypes[1], "vertex");
145
- await testColoring(coloringTypes[2], "cell");
129
+ test("coloring vertex", async () => {
130
+ const dataStyleStore = useDataStyleStore();
131
+ const viewerStore = useViewerStore();
132
+ await dataStyleStore.setMeshCellsVertexAttributeName(id, vertex_attribute.name);
133
+ const coloringName = "vertex";
134
+ const result = dataStyleStore.setMeshCellsActiveColoring(id, coloringName);
135
+ expect(result).toBeInstanceOf(Promise);
136
+ await result;
137
+ expect(dataStyleStore.meshCellsActiveColoring(id)).toBe(coloringName);
138
+ expect(viewerStore.status).toBe(Status.CONNECTED);
139
+ });
140
+
141
+ test("coloring cell", async () => {
142
+ const dataStyleStore = useDataStyleStore();
143
+ const viewerStore = useViewerStore();
144
+ await dataStyleStore.setMeshCellsCellAttributeName(id, cell_attribute.name);
145
+ const coloringName = "cell";
146
+ const result = dataStyleStore.setMeshCellsActiveColoring(id, coloringName);
147
+ expect(result).toBeInstanceOf(Promise);
148
+ await result;
149
+ expect(dataStyleStore.meshCellsActiveColoring(id)).toBe(coloringName);
150
+ expect(viewerStore.status).toBe(Status.CONNECTED);
146
151
  });
147
152
  });
148
153
 
149
- test("Cells apply default style", async () => {
154
+ test("cells apply default style", async () => {
150
155
  const dataStyleStore = useDataStyleStore();
151
156
  const viewerStore = useViewerStore();
152
157
  const result = dataStyleStore.applyMeshCellsStyle(id);
@@ -20,18 +20,18 @@ const edge_attribute = { name: "edge_attribute" };
20
20
  let id = "",
21
21
  projectFolderPath = "";
22
22
 
23
- beforeAll(async () => {
24
- ({ id, projectFolderPath } = await setupIntegrationTests(file_name, geode_object));
25
- }, INTERVAL_TIMEOUT);
23
+ describe("mesh edges", () => {
24
+ beforeAll(async () => {
25
+ ({ id, projectFolderPath } = await setupIntegrationTests(file_name, geode_object));
26
+ }, INTERVAL_TIMEOUT);
26
27
 
27
- afterAll(async () => {
28
- console.log("afterAll mesh edges kill", projectFolderPath);
29
- await cleanupBackend(projectFolderPath);
30
- });
28
+ afterAll(async () => {
29
+ console.log("afterAll mesh edges kill", projectFolderPath);
30
+ await cleanupBackend(projectFolderPath);
31
+ });
31
32
 
32
- describe("Mesh edges", () => {
33
- describe("Edges", () => {
34
- test("Edges visibility", async () => {
33
+ describe("edges", () => {
34
+ test("edges visibility", async () => {
35
35
  const dataStyleStore = useDataStyleStore();
36
36
  const viewerStore = useViewerStore();
37
37
  const visibility = true;
@@ -50,10 +50,10 @@ describe("Mesh edges", () => {
50
50
  expect(viewerStore.status).toBe(Status.CONNECTED);
51
51
  });
52
52
 
53
- test("Edges color red", async () => {
53
+ test("edges color red", async () => {
54
54
  const dataStyleStore = useDataStyleStore();
55
55
  const viewerStore = useViewerStore();
56
- const color = { r: 255, g: 0, b: 0 };
56
+ const color = { red: 255, green: 0, blue: 0, alpha: 1 };
57
57
  const spy = vi.spyOn(viewerStore, "request");
58
58
  const result = dataStyleStore.setMeshEdgesColor(id, color);
59
59
  expect(result).toBeInstanceOf(Promise);
@@ -69,7 +69,7 @@ describe("Mesh edges", () => {
69
69
  expect(viewerStore.status).toBe(Status.CONNECTED);
70
70
  });
71
71
 
72
- test("Edges vertex attribute", async () => {
72
+ test("edges vertex attribute", async () => {
73
73
  const dataStyleStore = useDataStyleStore();
74
74
  const viewerStore = useViewerStore();
75
75
 
@@ -86,7 +86,7 @@ describe("Mesh edges", () => {
86
86
  expect(viewerStore.status).toBe(Status.CONNECTED);
87
87
  });
88
88
 
89
- test("Edges edge attribute", async () => {
89
+ test("edges edge attribute", async () => {
90
90
  const dataStyleStore = useDataStyleStore();
91
91
  const viewerStore = useViewerStore();
92
92
 
@@ -103,36 +103,42 @@ describe("Mesh edges", () => {
103
103
  expect(viewerStore.status).toBe(Status.CONNECTED);
104
104
  });
105
105
 
106
- test("Edges active coloring", async () => {
106
+ test("coloring color", async () => {
107
107
  const dataStyleStore = useDataStyleStore();
108
108
  const viewerStore = useViewerStore();
109
- const coloringTypes = [
110
- { name: "color" },
111
- {
112
- name: "vertex",
113
- function: () => dataStyleStore.setMeshEdgesVertexAttributeName(id, vertex_attribute.name),
114
- },
115
- {
116
- name: "edge",
117
- function: () => dataStyleStore.setMeshEdgesEdgeAttributeName(id, edge_attribute.name),
118
- },
119
- ];
120
- async function testColoring(coloringType) {
121
- if (coloringType.function) {
122
- await coloringType.function();
123
- }
124
- const result = dataStyleStore.setMeshEdgesActiveColoring(id, coloringType.name);
125
- expect(result).toBeInstanceOf(Promise);
126
- await result;
127
- expect(dataStyleStore.meshEdgesActiveColoring(id)).toBe(coloringType.name);
128
- expect(viewerStore.status).toBe(Status.CONNECTED);
129
- }
109
+ const coloringName = "color";
110
+ const result = dataStyleStore.setMeshEdgesActiveColoring(id, coloringName);
111
+ expect(result).toBeInstanceOf(Promise);
112
+ await result;
113
+ expect(dataStyleStore.meshEdgesActiveColoring(id)).toBe(coloringName);
114
+ expect(viewerStore.status).toBe(Status.CONNECTED);
115
+ });
130
116
 
131
- await testColoring(coloringTypes[0]);
132
- await testColoring(coloringTypes[1]);
133
- await testColoring(coloringTypes[2]);
117
+ test("coloring vertex", async () => {
118
+ const dataStyleStore = useDataStyleStore();
119
+ const viewerStore = useViewerStore();
120
+ await dataStyleStore.setMeshEdgesVertexAttributeName(id, vertex_attribute.name);
121
+ const coloringName = "vertex";
122
+ const result = dataStyleStore.setMeshEdgesActiveColoring(id, coloringName);
123
+ expect(result).toBeInstanceOf(Promise);
124
+ await result;
125
+ expect(dataStyleStore.meshEdgesActiveColoring(id)).toBe(coloringName);
126
+ expect(viewerStore.status).toBe(Status.CONNECTED);
127
+ });
128
+
129
+ test("coloring edge", async () => {
130
+ const dataStyleStore = useDataStyleStore();
131
+ const viewerStore = useViewerStore();
132
+ await dataStyleStore.setMeshEdgesEdgeAttributeName(id, edge_attribute.name);
133
+ const coloringName = "edge";
134
+ const result = dataStyleStore.setMeshEdgesActiveColoring(id, coloringName);
135
+ expect(result).toBeInstanceOf(Promise);
136
+ await result;
137
+ expect(dataStyleStore.meshEdgesActiveColoring(id)).toBe(coloringName);
138
+ expect(viewerStore.status).toBe(Status.CONNECTED);
134
139
  });
135
- test("Edges apply style", async () => {
140
+
141
+ test("edges apply style", async () => {
136
142
  const dataStyleStore = useDataStyleStore();
137
143
  const viewerStore = useViewerStore();
138
144
  const result = dataStyleStore.applyMeshEdgesStyle(id);
@@ -18,18 +18,18 @@ const geode_object = "RegularGrid3D";
18
18
  let id = "",
19
19
  projectFolderPath = "";
20
20
 
21
- beforeAll(async () => {
22
- ({ id, projectFolderPath } = await setupIntegrationTests(file_name, geode_object));
23
- }, INTERVAL_TIMEOUT);
21
+ describe("mesh", () => {
22
+ beforeAll(async () => {
23
+ ({ id, projectFolderPath } = await setupIntegrationTests(file_name, geode_object));
24
+ }, INTERVAL_TIMEOUT);
24
25
 
25
- afterAll(async () => {
26
- console.log("afterAll mesh index kill", projectFolderPath);
27
- await cleanupBackend(projectFolderPath);
28
- });
26
+ afterAll(async () => {
27
+ console.log("afterAll mesh index kill", projectFolderPath);
28
+ await cleanupBackend(projectFolderPath);
29
+ });
29
30
 
30
- describe("Mesh", () => {
31
- describe("Mesh visibility", () => {
32
- test("Visibility true", async () => {
31
+ describe("mesh visibility", () => {
32
+ test("visibility true", async () => {
33
33
  const dataStyleStore = useDataStyleStore();
34
34
  const viewerStore = useViewerStore();
35
35
  const visibility = true;
@@ -49,8 +49,8 @@ describe("Mesh", () => {
49
49
  });
50
50
  });
51
51
 
52
- describe("Apply mesh default style", () => {
53
- test("Apply mesh default style", async () => {
52
+ describe("apply mesh default style", () => {
53
+ test("apply mesh default style", async () => {
54
54
  const dataStyleStore = useDataStyleStore();
55
55
  const viewerStore = useViewerStore();
56
56
  const result = dataStyleStore.applyMeshStyle(id);