@geode/opengeodeweb-front 10.3.0 → 10.3.1
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/.eslintrc.cjs +1 -0
- package/app/assets/geode_objects.js +1 -3
- package/app/components/Carousel.vue +7 -4
- package/app/components/CrsSelector.vue +5 -6
- package/app/components/DragAndDrop.vue +18 -8
- package/app/components/ExtensionSelector.vue +9 -17
- package/app/components/FeedBack/ErrorBanner.vue +1 -1
- package/app/components/FeedBack/Snackers.vue +4 -1
- package/app/components/FileSelector.vue +21 -10
- package/app/components/FileUploader.vue +15 -32
- package/app/components/HybridRenderingView.vue +5 -3
- package/app/components/Inspector/InspectionButton.vue +2 -2
- package/app/components/Inspector/ResultPanel.vue +4 -4
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading.vue +6 -6
- package/app/components/MissingFilesSelector.vue +23 -29
- package/app/components/ObjectSelector.vue +11 -10
- package/app/components/OptionCard.vue +1 -1
- package/app/components/PackagesVersions.vue +5 -3
- package/app/components/Recaptcha.vue +6 -4
- package/app/components/RemoteRenderingView.vue +4 -3
- package/app/components/Screenshot.vue +4 -4
- package/app/components/Step.vue +7 -7
- package/app/components/VeaseViewToolbar.vue +3 -3
- package/app/components/Viewer/BreadCrumb.vue +2 -4
- package/app/components/Viewer/ContextMenu.vue +77 -45
- package/app/components/Viewer/ContextMenuItem.vue +42 -33
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +3 -3
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +5 -5
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +6 -6
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +5 -5
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +5 -5
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +6 -7
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +6 -6
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +4 -4
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +3 -3
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +3 -3
- package/app/components/Viewer/Options/CellAttributeSelector.vue +23 -20
- package/app/components/Viewer/Options/ColorMapList.vue +75 -50
- package/app/components/Viewer/Options/ColorMapPicker.vue +38 -32
- package/app/components/Viewer/Options/ColorPicker.vue +3 -3
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +29 -21
- package/app/components/Viewer/Options/EdgeAttributeSelector.vue +7 -7
- package/app/components/Viewer/Options/PolygonAttributeSelector.vue +7 -7
- package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +7 -7
- package/app/components/Viewer/Options/TextureItem.vue +5 -5
- package/app/components/Viewer/Options/TexturesSelector.vue +5 -5
- package/app/components/Viewer/Options/VertexAttributeSelector.vue +7 -7
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +5 -5
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +3 -3
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +3 -3
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +6 -6
- package/app/components/Viewer/Solid/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Solid/PointsOptions.vue +3 -3
- package/app/components/Viewer/Solid/PolygonsOptions.vue +3 -3
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +6 -6
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +3 -3
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +3 -3
- package/app/components/Viewer/Tree/ObjectTree.vue +7 -9
- package/app/components/Viewer/TreeComponent.vue +9 -13
- package/app/components/Viewer/TreeObject.vue +8 -9
- package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +3 -3
- package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +3 -3
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +3 -3
- package/app/components/Wrapper.vue +1 -2
- package/app/components/ZScaling.vue +1 -1
- package/app/composables/project_manager.js +6 -6
- package/app/plugins/auto_store_register.js +1 -1
- package/app/stores/app.js +45 -41
- package/app/stores/data.js +52 -51
- package/app/stores/data_style.js +12 -11
- package/app/stores/feedback.js +5 -1
- package/app/stores/geode.js +16 -13
- package/app/stores/hybrid_viewer.js +72 -44
- package/app/stores/infra.js +18 -16
- package/app/stores/lambda.js +1 -9
- package/app/stores/menu.js +13 -13
- package/app/stores/treeview.js +15 -13
- package/app/stores/viewer.js +39 -33
- package/app/utils/app_mode.js +4 -3
- package/app/utils/default_styles.js +55 -47
- package/app/utils/file_import_workflow.js +4 -17
- package/app/utils/local.js +195 -184
- package/app/utils/upload_file.js +1 -2
- package/eslint.config.js +2 -2
- package/internal/database/database.js +17 -32
- package/internal/database/extended_database.js +25 -0
- package/internal/stores/data_style/mesh/cells/cell.js +3 -3
- package/internal/stores/data_style/mesh/cells/color.js +1 -1
- package/internal/stores/data_style/mesh/cells/index.js +7 -7
- package/internal/stores/data_style/mesh/cells/textures.js +1 -1
- package/internal/stores/data_style/mesh/cells/vertex.js +3 -3
- package/internal/stores/data_style/mesh/cells/visibility.js +1 -1
- package/internal/stores/data_style/mesh/edges/color.js +1 -1
- package/internal/stores/data_style/mesh/edges/edge.js +22 -22
- package/internal/stores/data_style/mesh/edges/index.js +7 -7
- package/internal/stores/data_style/mesh/edges/vertex.js +3 -3
- package/internal/stores/data_style/mesh/edges/visibility.js +1 -1
- package/internal/stores/data_style/mesh/edges/width.js +1 -1
- package/internal/stores/data_style/mesh/index.js +4 -5
- package/internal/stores/data_style/mesh/points/color.js +1 -1
- package/internal/stores/data_style/mesh/points/index.js +6 -6
- package/internal/stores/data_style/mesh/points/size.js +1 -1
- package/internal/stores/data_style/mesh/points/vertex.js +3 -3
- package/internal/stores/data_style/mesh/points/visibility.js +1 -1
- package/internal/stores/data_style/mesh/polygons/color.js +1 -1
- package/internal/stores/data_style/mesh/polygons/index.js +7 -7
- package/internal/stores/data_style/mesh/polygons/polygon.js +3 -3
- package/internal/stores/data_style/mesh/polygons/textures.js +1 -1
- package/internal/stores/data_style/mesh/polygons/vertex.js +3 -3
- package/internal/stores/data_style/mesh/polygons/visibility.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/color.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/index.js +6 -6
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +3 -3
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +3 -3
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +1 -1
- package/internal/stores/data_style/model/edges.js +1 -1
- package/internal/stores/data_style/model/index.js +32 -22
- package/internal/utils/api_fetch.js +8 -5
- package/internal/utils/viewer_call.js +42 -46
- package/nuxt.config.js +3 -3
- package/package.json +1 -1
- package/scripts/generate_geode_objects.js +8 -7
- package/tests/integration/setup.js +28 -21
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +17 -10
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +10 -6
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +10 -6
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +10 -6
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +10 -6
- package/tests/integration/stores/viewer.nuxt.test.js +55 -39
- package/tests/setup_indexeddb.js +1 -0
- package/tests/unit/components/CrsSelector.nuxt.test.js +18 -19
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +24 -19
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -36
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +20 -25
- package/tests/unit/components/FileSelector.nuxt.test.js +27 -27
- package/tests/unit/components/FileUploader.nuxt.test.js +18 -17
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +9 -16
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +8 -6
- package/tests/unit/components/Launcher.nuxt.test.js +12 -17
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +16 -19
- package/tests/unit/components/ObjectSelector.nuxt.test.js +30 -34
- package/tests/unit/components/PackagesVersions.nuxt.test.js +8 -11
- package/tests/unit/components/Step.nuxt.test.js +8 -7
- package/tests/unit/components/Stepper.nuxt.test.js +14 -12
- package/tests/unit/composables/ProjectManager.nuxt.test.js +142 -100
- package/tests/unit/composables/api_fetch.nuxt.test.js +12 -39
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -61
- package/tests/unit/composables/upload_file.nuxt.test.js +21 -25
- package/tests/unit/plugins/project_load.nuxt.test.js +22 -21
- package/tests/unit/stores/App.nuxt.test.js +45 -43
- package/tests/unit/stores/Feedback.nuxt.test.js +16 -18
- package/tests/unit/stores/Geode.nuxt.test.js +135 -137
- package/tests/unit/stores/Infra.nuxt.test.js +20 -26
- package/tests/unit/stores/Lambda.nuxt.test.js +30 -31
- package/tests/unit/stores/Treeview.nuxt.test.js +53 -55
- package/tests/unit/stores/Viewer.nuxt.test.js +16 -23
- package/tests/unit/utils/validate_schema.nuxt.test.js +18 -18
- package/tests/utils.js +15 -2
- package/tests/vitest.config.js +6 -2
|
@@ -3,29 +3,33 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
6
|
import {
|
|
10
7
|
delete_folder_recursive,
|
|
11
8
|
kill_back,
|
|
12
9
|
kill_viewer,
|
|
13
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
14
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
16
16
|
// Local constants
|
|
17
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
17
18
|
const mesh_polygons_schemas = viewer_schemas.opengeodeweb_viewer.mesh.polygons
|
|
18
19
|
const file_name = "test.og_psf3d"
|
|
19
20
|
const geode_object = "PolygonalSurface3D"
|
|
20
21
|
const vertex_attribute = { name: "points" }
|
|
21
22
|
const polygon_attribute = { name: "test_attribute" }
|
|
22
23
|
|
|
23
|
-
let
|
|
24
|
+
let back_port = 0,
|
|
25
|
+
id = "",
|
|
26
|
+
project_folder_path = "",
|
|
27
|
+
viewer_port = 0
|
|
24
28
|
|
|
25
29
|
beforeEach(async () => {
|
|
26
30
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
27
31
|
await setupIntegrationTests(file_name, geode_object))
|
|
28
|
-
},
|
|
32
|
+
}, INTERVAL_TIMEOUT)
|
|
29
33
|
|
|
30
34
|
afterEach(async () => {
|
|
31
35
|
console.log(
|
|
@@ -156,21 +160,25 @@ describe("Mesh polygons", () => {
|
|
|
156
160
|
},
|
|
157
161
|
]
|
|
158
162
|
|
|
159
|
-
|
|
160
|
-
if (
|
|
161
|
-
await
|
|
163
|
+
async function testColoring(coloringType, expectedColoringType) {
|
|
164
|
+
if (coloringType.function) {
|
|
165
|
+
await coloringType.function()
|
|
162
166
|
}
|
|
163
167
|
const result = dataStyleStore.setMeshPolygonsActiveColoring(
|
|
164
168
|
id,
|
|
165
|
-
|
|
169
|
+
coloringType.name,
|
|
166
170
|
)
|
|
167
171
|
expect(result).toBeInstanceOf(Promise)
|
|
168
172
|
await result
|
|
169
173
|
expect(dataStyleStore.meshPolygonsActiveColoring(id)).toBe(
|
|
170
|
-
|
|
174
|
+
expectedColoringType,
|
|
171
175
|
)
|
|
172
176
|
expect(viewerStore.status).toBe(Status.CONNECTED)
|
|
173
177
|
}
|
|
178
|
+
|
|
179
|
+
await testColoring(coloringTypes[0], "color")
|
|
180
|
+
await testColoring(coloringTypes[1], "vertex")
|
|
181
|
+
await testColoring(coloringTypes[2], "polygon")
|
|
174
182
|
})
|
|
175
183
|
})
|
|
176
184
|
|
|
@@ -3,29 +3,33 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
6
|
import {
|
|
10
7
|
delete_folder_recursive,
|
|
11
8
|
kill_back,
|
|
12
9
|
kill_viewer,
|
|
13
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
14
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
16
16
|
// Local constants
|
|
17
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
17
18
|
const mesh_polyhedra_schemas = viewer_schemas.opengeodeweb_viewer.mesh.polyhedra
|
|
18
19
|
const file_name = "test.vtu"
|
|
19
20
|
const geode_object = "HybridSolid3D"
|
|
20
21
|
const vertex_attribute = { name: "toto_on_vertices" }
|
|
21
22
|
const polyhedron_attribute = { name: "toto_on_polyhedra" }
|
|
22
23
|
|
|
23
|
-
let
|
|
24
|
+
let back_port = 0,
|
|
25
|
+
id = "",
|
|
26
|
+
project_folder_path = "",
|
|
27
|
+
viewer_port = 0
|
|
24
28
|
|
|
25
29
|
beforeEach(async () => {
|
|
26
30
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
27
31
|
await setupIntegrationTests(file_name, geode_object))
|
|
28
|
-
},
|
|
32
|
+
}, INTERVAL_TIMEOUT)
|
|
29
33
|
|
|
30
34
|
afterEach(async () => {
|
|
31
35
|
console.log(
|
|
@@ -100,21 +104,25 @@ describe("Mesh polyhedra", () => {
|
|
|
100
104
|
),
|
|
101
105
|
},
|
|
102
106
|
]
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
await
|
|
107
|
+
async function testColoring(coloringType, expectedColoringType) {
|
|
108
|
+
if (coloringType.function) {
|
|
109
|
+
await coloringType.function()
|
|
106
110
|
}
|
|
107
111
|
const result = dataStyleStore.setMeshPolyhedraActiveColoring(
|
|
108
112
|
id,
|
|
109
|
-
|
|
113
|
+
coloringType.name,
|
|
110
114
|
)
|
|
111
115
|
expect(result).toBeInstanceOf(Promise)
|
|
112
116
|
await result
|
|
113
117
|
expect(dataStyleStore.meshPolyhedraActiveColoring(id)).toBe(
|
|
114
|
-
|
|
118
|
+
expectedColoringType,
|
|
115
119
|
)
|
|
116
120
|
expect(viewerStore.status).toBe(Status.CONNECTED)
|
|
117
121
|
}
|
|
122
|
+
|
|
123
|
+
await testColoring(coloringTypes[0], "color")
|
|
124
|
+
await testColoring(coloringTypes[1], "vertex")
|
|
125
|
+
await testColoring(coloringTypes[2], "polyhedron")
|
|
118
126
|
})
|
|
119
127
|
})
|
|
120
128
|
|
|
@@ -3,28 +3,32 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
|
-
import { useDataStore } from "@ogw_front/stores/data"
|
|
10
6
|
import {
|
|
11
7
|
delete_folder_recursive,
|
|
12
8
|
kill_back,
|
|
13
9
|
kill_viewer,
|
|
14
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
15
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
16
16
|
|
|
17
17
|
// Local constants
|
|
18
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
18
19
|
const model_blocks_schemas = viewer_schemas.opengeodeweb_viewer.model.blocks
|
|
19
20
|
const file_name = "test.og_brep"
|
|
20
21
|
const geode_object = "BRep"
|
|
21
22
|
|
|
22
|
-
let
|
|
23
|
+
let back_port = 0,
|
|
24
|
+
id = "",
|
|
25
|
+
project_folder_path = "",
|
|
26
|
+
viewer_port = 0
|
|
23
27
|
|
|
24
28
|
beforeEach(async () => {
|
|
25
29
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
26
30
|
await setupIntegrationTests(file_name, geode_object))
|
|
27
|
-
},
|
|
31
|
+
}, INTERVAL_TIMEOUT)
|
|
28
32
|
|
|
29
33
|
afterEach(async () => {
|
|
30
34
|
console.log(
|
|
@@ -3,28 +3,32 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
|
-
import { useDataStore } from "@ogw_front/stores/data"
|
|
10
6
|
import {
|
|
11
7
|
delete_folder_recursive,
|
|
12
8
|
kill_back,
|
|
13
9
|
kill_viewer,
|
|
14
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
15
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
16
16
|
|
|
17
17
|
// Local constants
|
|
18
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
18
19
|
const model_corners_schemas = viewer_schemas.opengeodeweb_viewer.model.corners
|
|
19
20
|
const file_name = "test.og_brep"
|
|
20
21
|
const geode_object = "BRep"
|
|
21
22
|
|
|
22
|
-
let
|
|
23
|
+
let back_port = 0,
|
|
24
|
+
id = "",
|
|
25
|
+
project_folder_path = "",
|
|
26
|
+
viewer_port = 0
|
|
23
27
|
|
|
24
28
|
beforeEach(async () => {
|
|
25
29
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
26
30
|
await setupIntegrationTests(file_name, geode_object))
|
|
27
|
-
},
|
|
31
|
+
}, INTERVAL_TIMEOUT)
|
|
28
32
|
|
|
29
33
|
afterEach(async () => {
|
|
30
34
|
console.log(
|
|
@@ -3,27 +3,31 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
6
|
import {
|
|
10
7
|
delete_folder_recursive,
|
|
11
8
|
kill_back,
|
|
12
9
|
kill_viewer,
|
|
13
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
14
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
16
16
|
// Local constants
|
|
17
|
+
const INTERVAL_TIMEOUT = 25_000
|
|
17
18
|
const model_edges_schemas = viewer_schemas.opengeodeweb_viewer.model.edges
|
|
18
19
|
const file_name = "test.og_brep"
|
|
19
20
|
const geode_object = "BRep"
|
|
20
21
|
|
|
21
|
-
let
|
|
22
|
+
let back_port = 0,
|
|
23
|
+
id = "",
|
|
24
|
+
project_folder_path = "",
|
|
25
|
+
viewer_port = 0
|
|
22
26
|
|
|
23
27
|
beforeEach(async () => {
|
|
24
28
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
25
29
|
await setupIntegrationTests(file_name, geode_object))
|
|
26
|
-
},
|
|
30
|
+
}, INTERVAL_TIMEOUT)
|
|
27
31
|
|
|
28
32
|
afterEach(async () => {
|
|
29
33
|
console.log(
|
|
@@ -3,27 +3,31 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
6
|
import {
|
|
10
7
|
delete_folder_recursive,
|
|
11
8
|
kill_back,
|
|
12
9
|
kill_viewer,
|
|
13
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
14
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
16
16
|
// Local constants
|
|
17
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
17
18
|
const model_schemas = viewer_schemas.opengeodeweb_viewer.model
|
|
18
19
|
const file_name = "test.og_brep"
|
|
19
20
|
const geode_object = "BRep"
|
|
20
21
|
|
|
21
|
-
let
|
|
22
|
+
let back_port = 0,
|
|
23
|
+
id = "",
|
|
24
|
+
project_folder_path = "",
|
|
25
|
+
viewer_port = 0
|
|
22
26
|
|
|
23
27
|
beforeEach(async () => {
|
|
24
28
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
25
29
|
await setupIntegrationTests(file_name, geode_object))
|
|
26
|
-
},
|
|
30
|
+
}, INTERVAL_TIMEOUT)
|
|
27
31
|
|
|
28
32
|
afterEach(async () => {
|
|
29
33
|
console.log(
|
|
@@ -3,28 +3,32 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
|
-
import { useDataStore } from "@ogw_front/stores/data"
|
|
10
6
|
import {
|
|
11
7
|
delete_folder_recursive,
|
|
12
8
|
kill_back,
|
|
13
9
|
kill_viewer,
|
|
14
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
15
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
16
16
|
|
|
17
17
|
// Local constants
|
|
18
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
18
19
|
const model_lines_schemas = viewer_schemas.opengeodeweb_viewer.model.lines
|
|
19
20
|
const file_name = "test.og_brep"
|
|
20
21
|
const geode_object = "BRep"
|
|
21
22
|
|
|
22
|
-
let
|
|
23
|
+
let back_port = 0,
|
|
24
|
+
id = "",
|
|
25
|
+
project_folder_path = "",
|
|
26
|
+
viewer_port = 0
|
|
23
27
|
|
|
24
28
|
beforeEach(async () => {
|
|
25
29
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
26
30
|
await setupIntegrationTests(file_name, geode_object))
|
|
27
|
-
},
|
|
31
|
+
}, INTERVAL_TIMEOUT)
|
|
28
32
|
|
|
29
33
|
afterEach(async () => {
|
|
30
34
|
console.log("afterEach model lines kill", back_port, viewer_port)
|
|
@@ -3,27 +3,31 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
9
6
|
import {
|
|
10
7
|
delete_folder_recursive,
|
|
11
8
|
kill_back,
|
|
12
9
|
kill_viewer,
|
|
13
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
14
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
14
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
15
15
|
|
|
16
16
|
// Local constants
|
|
17
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
17
18
|
const model_points_schemas = viewer_schemas.opengeodeweb_viewer.model.points
|
|
18
19
|
const file_name = "test.og_brep"
|
|
19
20
|
const geode_object = "BRep"
|
|
20
21
|
|
|
21
|
-
let
|
|
22
|
+
let back_port = 0,
|
|
23
|
+
id = "",
|
|
24
|
+
project_folder_path = "",
|
|
25
|
+
viewer_port = 0
|
|
22
26
|
|
|
23
27
|
beforeEach(async () => {
|
|
24
28
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
25
29
|
await setupIntegrationTests(file_name, geode_object))
|
|
26
|
-
},
|
|
30
|
+
}, INTERVAL_TIMEOUT)
|
|
27
31
|
|
|
28
32
|
afterEach(async () => {
|
|
29
33
|
console.log("afterEach model points kill", back_port, viewer_port)
|
|
@@ -3,28 +3,32 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"
|
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json" with { type: "json" }
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import Status from "@ogw_front/utils/status"
|
|
7
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
|
-
import { useDataStore } from "@ogw_front/stores/data"
|
|
9
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
10
6
|
import {
|
|
11
7
|
delete_folder_recursive,
|
|
12
8
|
kill_back,
|
|
13
9
|
kill_viewer,
|
|
14
10
|
} from "@ogw_front/utils/local"
|
|
11
|
+
import Status from "@ogw_front/utils/status"
|
|
15
12
|
import { setupIntegrationTests } from "../../../setup"
|
|
13
|
+
import { useDataStore } from "@ogw_front/stores/data"
|
|
14
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
15
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
16
16
|
|
|
17
17
|
// Local constants
|
|
18
|
+
const INTERVAL_TIMEOUT = 20_000
|
|
18
19
|
const model_surfaces_schemas = viewer_schemas.opengeodeweb_viewer.model.surfaces
|
|
19
20
|
const file_name = "test.og_brep"
|
|
20
21
|
const geode_object = "BRep"
|
|
21
22
|
|
|
22
|
-
let
|
|
23
|
+
let back_port = 0,
|
|
24
|
+
id = "",
|
|
25
|
+
project_folder_path = "",
|
|
26
|
+
viewer_port = 0
|
|
23
27
|
|
|
24
28
|
beforeEach(async () => {
|
|
25
29
|
;({ id, back_port, viewer_port, project_folder_path } =
|
|
26
30
|
await setupIntegrationTests(file_name, geode_object))
|
|
27
|
-
},
|
|
31
|
+
}, INTERVAL_TIMEOUT)
|
|
28
32
|
|
|
29
33
|
afterEach(async () => {
|
|
30
34
|
console.log(
|
|
@@ -1,61 +1,77 @@
|
|
|
1
1
|
// Global imports
|
|
2
2
|
|
|
3
3
|
// Third party imports
|
|
4
|
-
import {
|
|
5
|
-
import { createTestingPinia } from "@pinia/testing"
|
|
6
|
-
import { describe, test, expect, beforeEach, vi } from "vitest"
|
|
7
|
-
|
|
4
|
+
import { afterEach, beforeEach, describe, expect, test } from "vitest"
|
|
8
5
|
import opengeodeweb_viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
9
6
|
|
|
10
7
|
// Local imports
|
|
11
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
runMicroservices,
|
|
10
|
+
teardownIntegrationTests,
|
|
11
|
+
} from "../../integration/setup"
|
|
12
12
|
import Status from "@ogw_front/utils/status"
|
|
13
|
+
import { setupActivePinia } from "../../utils"
|
|
14
|
+
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
const CONNECT_TIMEOUT = 25_000
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
let back_port = 0,
|
|
19
|
+
viewer_port = 0,
|
|
20
|
+
project_folder_path = ""
|
|
21
|
+
|
|
22
|
+
beforeEach(async () => {
|
|
23
|
+
setupActivePinia()
|
|
24
|
+
;({ back_port, viewer_port, project_folder_path } = await runMicroservices())
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
afterEach(async () => {
|
|
28
|
+
await teardownIntegrationTests(back_port, viewer_port, project_folder_path)
|
|
22
29
|
})
|
|
23
30
|
|
|
24
31
|
describe("Viewer Store", () => {
|
|
25
32
|
describe("actions", () => {
|
|
26
33
|
describe("ws_connect", () => {
|
|
27
|
-
test(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
test(
|
|
35
|
+
"ws_connect",
|
|
36
|
+
async () => {
|
|
37
|
+
const viewerStore = useViewerStore()
|
|
38
|
+
await viewerStore.ws_connect()
|
|
39
|
+
expect(viewerStore.status).toBe(Status.CONNECTED)
|
|
40
|
+
},
|
|
41
|
+
CONNECT_TIMEOUT,
|
|
42
|
+
)
|
|
33
43
|
})
|
|
34
44
|
describe("connect", () => {
|
|
35
|
-
test(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
test(
|
|
46
|
+
"connect",
|
|
47
|
+
async () => {
|
|
48
|
+
const viewerStore = useViewerStore()
|
|
49
|
+
await viewerStore.connect()
|
|
50
|
+
expect(viewerStore.status).toBe(Status.CONNECTED)
|
|
51
|
+
},
|
|
52
|
+
CONNECT_TIMEOUT,
|
|
53
|
+
)
|
|
41
54
|
})
|
|
42
55
|
|
|
43
56
|
describe("request", () => {
|
|
44
|
-
test(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
test(
|
|
58
|
+
"request",
|
|
59
|
+
async () => {
|
|
60
|
+
const schema =
|
|
61
|
+
opengeodeweb_viewer_schemas.opengeodeweb_viewer.viewer.render
|
|
62
|
+
const viewerStore = useViewerStore()
|
|
63
|
+
const timeout = 1
|
|
64
|
+
const params = {}
|
|
65
|
+
expect(() =>
|
|
66
|
+
viewerStore
|
|
67
|
+
.request(schema, params, {}, timeout)
|
|
68
|
+
.rejects.toThrow(
|
|
69
|
+
`${schema.$id}: Timed out after ${timeout}ms, ${schema} ${params}`,
|
|
70
|
+
),
|
|
71
|
+
)
|
|
72
|
+
},
|
|
73
|
+
CONNECT_TIMEOUT,
|
|
74
|
+
)
|
|
59
75
|
})
|
|
60
76
|
})
|
|
61
77
|
})
|
package/tests/setup_indexeddb.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
+
// Third party imports
|
|
1
2
|
import { mountSuspended } from "@nuxt/test-utils/runtime"
|
|
2
|
-
import { describe, expect, test, vi } from "vitest"
|
|
3
|
-
import { setActivePinia } from "pinia"
|
|
4
|
-
import { createTestingPinia } from "@pinia/testing"
|
|
3
|
+
import { beforeEach, describe, expect, test, vi } from "vitest"
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
// Local imports
|
|
7
6
|
import CrsSelector from "@ogw_front/components/CrsSelector"
|
|
8
7
|
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
8
|
+
import { setupActivePinia, vuetify } from "../../utils"
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const EXPECTED_LENGTH = 1
|
|
11
|
+
const FIRST_INDEX = 0
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
let pinia
|
|
14
|
+
let geodeStore
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
createSpy: vi.fn,
|
|
19
|
-
})
|
|
20
|
-
setActivePinia(pinia)
|
|
21
|
-
const geodeStore = useGeodeStore()
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
pinia = setupActivePinia()
|
|
18
|
+
geodeStore = useGeodeStore()
|
|
22
19
|
geodeStore.base_url = ""
|
|
20
|
+
})
|
|
23
21
|
|
|
22
|
+
describe(CrsSelector, () => {
|
|
24
23
|
test(`Default behavior`, async () => {
|
|
25
24
|
const crs_list = [
|
|
26
25
|
{
|
|
@@ -45,14 +44,14 @@ describe("CrsSelector", () => {
|
|
|
45
44
|
},
|
|
46
45
|
props: { geode_object_type: "BRep", key_to_update },
|
|
47
46
|
})
|
|
48
|
-
const
|
|
47
|
+
const td_wrapper = await wrapper.find("td")
|
|
49
48
|
await wrapper.vm.$nextTick()
|
|
50
|
-
const input = await
|
|
49
|
+
const input = await td_wrapper.find("input")
|
|
51
50
|
await input.trigger("click")
|
|
52
51
|
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
53
|
-
expect(wrapper.emitted().update_values).toHaveLength(
|
|
54
|
-
expect(wrapper.emitted().update_values[
|
|
55
|
-
[key_to_update]: crs_list[
|
|
52
|
+
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH)
|
|
53
|
+
expect(wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX]).toEqual({
|
|
54
|
+
[key_to_update]: crs_list[FIRST_INDEX],
|
|
56
55
|
})
|
|
57
56
|
})
|
|
58
57
|
})
|