@geode/opengeodeweb-front 9.7.0 → 9.7.1-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/.github/workflows/CICD.yml +1 -1
- package/assets/geode_objects.js +25 -25
- package/components/FileUploader.vue +1 -0
- package/components/Launcher.vue +1 -1
- package/components/Loading.vue +11 -11
- package/components/ObjectSelector.vue +7 -19
- package/components/PackagesVersions.vue +1 -1
- package/components/Recaptcha.vue +1 -1
- package/components/RemoteRenderingView.vue +1 -1
- package/composables/api_fetch.js +33 -38
- package/composables/upload_file.js +10 -1
- package/eslint.config.cjs +13 -0
- package/nuxt.config.js +4 -0
- package/package.json +27 -28
- package/scripts/generate_geode_objects.js +2 -1
- package/stores/geode.js +1 -1
- package/stores/infra.js +1 -1
- package/stores/viewer.js +1 -1
- package/test/components/CrsSelector.nuxt.test.js +1 -3
- package/test/components/ExtensionSelector.nuxt.test.js +1 -3
- package/test/components/FeedBack/ErrorsBanner.nuxt.test.js +1 -3
- package/test/components/FeedBack/Snackers.nuxt.test.js +1 -3
- package/test/components/FileSelector.nuxt.test.js +5 -8
- package/test/components/FileUploader.nuxt.test.js +2 -3
- package/test/components/Inspector/InspectionButton.nuxt.test.js +1 -3
- package/test/components/Inspector/ResultPanel.nuxt.test.js +1 -3
- package/test/components/Launcher.nuxt.test.js +1 -3
- package/test/components/MissingFilesSelector.nuxt.test.js +3 -4
- package/test/components/ObjectSelector.nuxt.test.js +5 -3
- package/test/components/PackagesVersions.nuxt.test.js +1 -3
- package/test/components/Step.nuxt.test.js +2 -4
- package/test/components/Stepper.nuxt.test.js +2 -4
- package/test/components/Wrapper.nuxt.test.js +3 -5
- package/test/composables/run_function_when_microservices_connected.test.js +1 -1
- package/test/composables/upload_file.nuxt.test.js +1 -1
- package/test/stores/Feedback.nuxt.test.js +1 -1
- package/test/stores/Infra.nuxt.test.js +1 -1
package/assets/geode_objects.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import BRep from "
|
|
2
|
-
import CrossSection from "
|
|
3
|
-
import EdgedCurve2D from "
|
|
4
|
-
import EdgedCurve3D from "
|
|
5
|
-
import Graph from "
|
|
6
|
-
import HybridSolid3D from "
|
|
7
|
-
import ImplicitCrossSection from "
|
|
8
|
-
import ImplicitStructuralModel from "
|
|
9
|
-
import LightRegularGrid2D from "
|
|
10
|
-
import LightRegularGrid3D from "
|
|
11
|
-
import PointSet2D from "
|
|
12
|
-
import PointSet3D from "
|
|
13
|
-
import PolygonalSurface2D from "
|
|
14
|
-
import PolygonalSurface3D from "
|
|
15
|
-
import PolyhedralSolid3D from "
|
|
16
|
-
import RasterImage2D from "
|
|
17
|
-
import RasterImage3D from "
|
|
18
|
-
import RegularGrid2D from "
|
|
19
|
-
import RegularGrid3D from "
|
|
20
|
-
import Section from "
|
|
21
|
-
import StructuralModel from "
|
|
22
|
-
import TetrahedralSolid3D from "
|
|
23
|
-
import TriangulatedSurface2D from "
|
|
24
|
-
import TriangulatedSurface3D from "
|
|
25
|
-
import VertexSet from "
|
|
1
|
+
import BRep from "@ogw_f/assets/img/geode_objects/BRep.svg"
|
|
2
|
+
import CrossSection from "@ogw_f/assets/img/geode_objects/CrossSection.svg"
|
|
3
|
+
import EdgedCurve2D from "@ogw_f/assets/img/geode_objects/EdgedCurve2D.svg"
|
|
4
|
+
import EdgedCurve3D from "@ogw_f/assets/img/geode_objects/EdgedCurve3D.svg"
|
|
5
|
+
import Graph from "@ogw_f/assets/img/geode_objects/Graph.svg"
|
|
6
|
+
import HybridSolid3D from "@ogw_f/assets/img/geode_objects/HybridSolid3D.svg"
|
|
7
|
+
import ImplicitCrossSection from "@ogw_f/assets/img/geode_objects/ImplicitCrossSection.svg"
|
|
8
|
+
import ImplicitStructuralModel from "@ogw_f/assets/img/geode_objects/ImplicitStructuralModel.svg"
|
|
9
|
+
import LightRegularGrid2D from "@ogw_f/assets/img/geode_objects/LightRegularGrid2D.svg"
|
|
10
|
+
import LightRegularGrid3D from "@ogw_f/assets/img/geode_objects/LightRegularGrid3D.svg"
|
|
11
|
+
import PointSet2D from "@ogw_f/assets/img/geode_objects/PointSet2D.svg"
|
|
12
|
+
import PointSet3D from "@ogw_f/assets/img/geode_objects/PointSet3D.svg"
|
|
13
|
+
import PolygonalSurface2D from "@ogw_f/assets/img/geode_objects/PolygonalSurface2D.svg"
|
|
14
|
+
import PolygonalSurface3D from "@ogw_f/assets/img/geode_objects/PolygonalSurface3D.svg"
|
|
15
|
+
import PolyhedralSolid3D from "@ogw_f/assets/img/geode_objects/PolyhedralSolid3D.svg"
|
|
16
|
+
import RasterImage2D from "@ogw_f/assets/img/geode_objects/RasterImage2D.svg"
|
|
17
|
+
import RasterImage3D from "@ogw_f/assets/img/geode_objects/RasterImage3D.svg"
|
|
18
|
+
import RegularGrid2D from "@ogw_f/assets/img/geode_objects/RegularGrid2D.svg"
|
|
19
|
+
import RegularGrid3D from "@ogw_f/assets/img/geode_objects/RegularGrid3D.svg"
|
|
20
|
+
import Section from "@ogw_f/assets/img/geode_objects/Section.svg"
|
|
21
|
+
import StructuralModel from "@ogw_f/assets/img/geode_objects/StructuralModel.svg"
|
|
22
|
+
import TetrahedralSolid3D from "@ogw_f/assets/img/geode_objects/TetrahedralSolid3D.svg"
|
|
23
|
+
import TriangulatedSurface2D from "@ogw_f/assets/img/geode_objects/TriangulatedSurface2D.svg"
|
|
24
|
+
import TriangulatedSurface3D from "@ogw_f/assets/img/geode_objects/TriangulatedSurface3D.svg"
|
|
25
|
+
import VertexSet from "@ogw_f/assets/img/geode_objects/VertexSet.svg"
|
|
26
26
|
|
|
27
27
|
const geode_objects = {
|
|
28
28
|
BRep: {
|
package/components/Launcher.vue
CHANGED
package/components/Loading.vue
CHANGED
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script setup>
|
|
28
|
-
import ying_yang from "
|
|
29
|
-
import chemin from "
|
|
30
|
-
import vert from "
|
|
31
|
-
import lampadaire from "
|
|
32
|
-
import collegue from "
|
|
33
|
-
import sobene from "
|
|
34
|
-
import etincelle from "
|
|
35
|
-
import geste from "
|
|
36
|
-
import socle from "
|
|
37
|
-
import derniere from "
|
|
38
|
-
import salon from "
|
|
28
|
+
import ying_yang from "@ogw_f/assets/img/energy_sobriety/ying_yang.png"
|
|
29
|
+
import chemin from "@ogw_f/assets/img/energy_sobriety/chemin.png"
|
|
30
|
+
import vert from "@ogw_f/assets/img/energy_sobriety/vert.png"
|
|
31
|
+
import lampadaire from "@ogw_f/assets/img/energy_sobriety/lampadaire.png"
|
|
32
|
+
import collegue from "@ogw_f/assets/img/energy_sobriety/collegue.png"
|
|
33
|
+
import sobene from "@ogw_f/assets/img/energy_sobriety/sobene.png"
|
|
34
|
+
import etincelle from "@ogw_f/assets/img/energy_sobriety/etincelle.png"
|
|
35
|
+
import geste from "@ogw_f/assets/img/energy_sobriety/geste.png"
|
|
36
|
+
import socle from "@ogw_f/assets/img/energy_sobriety/socle.png"
|
|
37
|
+
import derniere from "@ogw_f/assets/img/energy_sobriety/derniere.png"
|
|
38
|
+
import salon from "@ogw_f/assets/img/energy_sobriety/salon.png"
|
|
39
39
|
|
|
40
40
|
const users_list = [
|
|
41
41
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script setup>
|
|
52
|
-
import geode_objects from "
|
|
52
|
+
import geode_objects from "@ogw_f/assets/geode_objects"
|
|
53
53
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
54
54
|
|
|
55
55
|
const schema = schemas.opengeodeweb_back.allowed_objects
|
|
@@ -72,25 +72,14 @@
|
|
|
72
72
|
var promise_array = []
|
|
73
73
|
for (const filename of filenames) {
|
|
74
74
|
const params = { filename, supported_feature }
|
|
75
|
-
const promise =
|
|
76
|
-
api_fetch(
|
|
77
|
-
{ schema, params },
|
|
78
|
-
{
|
|
79
|
-
request_error_function: () => {
|
|
80
|
-
reject()
|
|
81
|
-
},
|
|
82
|
-
response_function: (response) => {
|
|
83
|
-
resolve(response._data.allowed_objects)
|
|
84
|
-
},
|
|
85
|
-
response_error_function: () => {
|
|
86
|
-
reject()
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
)
|
|
90
|
-
})
|
|
75
|
+
const promise = api_fetch({ schema, params })
|
|
91
76
|
promise_array.push(promise)
|
|
92
77
|
}
|
|
93
|
-
const
|
|
78
|
+
const responses = await Promise.all(promise_array)
|
|
79
|
+
let values = []
|
|
80
|
+
for (const response of responses) {
|
|
81
|
+
values.push(response.data.value.allowed_objects)
|
|
82
|
+
}
|
|
94
83
|
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))]
|
|
95
84
|
const common_keys = all_keys.filter(
|
|
96
85
|
(i) => !values.some((j) => !Object.keys(j).includes(i)),
|
|
@@ -119,7 +108,6 @@
|
|
|
119
108
|
emit("increment_step")
|
|
120
109
|
}
|
|
121
110
|
}
|
|
122
|
-
|
|
123
111
|
await get_allowed_objects()
|
|
124
112
|
</script>
|
|
125
113
|
|
package/components/Recaptcha.vue
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
onMounted(() => {
|
|
23
23
|
if (process.client) {
|
|
24
24
|
const config = useRuntimeConfig()
|
|
25
|
-
if (config.public.NODE_ENV !== "production") {
|
|
25
|
+
if (config.public.NODE_ENV !== "production" || !infra_store.is_cloud) {
|
|
26
26
|
infra_store.$patch({ is_captcha_validated: true })
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import vtkRemoteView from "@kitware/vtk.js/Rendering/Misc/RemoteView"
|
|
25
25
|
import { useElementSize, useWindowSize } from "@vueuse/core"
|
|
26
26
|
import viewer_schemas from "@geode/opengeodeweb-viewer/schemas.json"
|
|
27
|
-
import Status from "
|
|
27
|
+
import Status from "@ogw_f/utils/status.js"
|
|
28
28
|
|
|
29
29
|
const props = defineProps({
|
|
30
30
|
viewId: { type: String, default: "-1" },
|
package/composables/api_fetch.js
CHANGED
|
@@ -29,46 +29,41 @@ export function api_fetch(
|
|
|
29
29
|
if (schema.max_retry) {
|
|
30
30
|
request_options.max_retry = schema.max_retry
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
return useFetch(schema.$id, {
|
|
33
|
+
baseURL: geode_store.base_url,
|
|
34
|
+
...request_options,
|
|
35
|
+
async onRequestError({ error }) {
|
|
36
|
+
await geode_store.stop_request()
|
|
37
|
+
await feedback_store.add_error(
|
|
38
|
+
error.code,
|
|
39
|
+
schema.$id,
|
|
40
|
+
error.message,
|
|
41
|
+
error.stack,
|
|
42
|
+
)
|
|
43
|
+
if (request_error_function) {
|
|
44
|
+
await request_error_function(error)
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
async onResponse({ response }) {
|
|
48
|
+
if (response.ok) {
|
|
37
49
|
await geode_store.stop_request()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
schema.$id,
|
|
41
|
-
error.message,
|
|
42
|
-
error.stack,
|
|
43
|
-
)
|
|
44
|
-
if (request_error_function) {
|
|
45
|
-
await request_error_function(error)
|
|
50
|
+
if (response_function) {
|
|
51
|
+
await response_function(response)
|
|
46
52
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
response.status,
|
|
62
|
-
schema.$id,
|
|
63
|
-
response._data.name,
|
|
64
|
-
response._data.description,
|
|
65
|
-
)
|
|
66
|
-
if (response_error_function) {
|
|
67
|
-
await response_error_function(response)
|
|
68
|
-
}
|
|
69
|
-
reject(response)
|
|
70
|
-
},
|
|
71
|
-
})
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
async onResponseError({ response }) {
|
|
56
|
+
await geode_store.stop_request()
|
|
57
|
+
await feedback_store.add_error(
|
|
58
|
+
response.status,
|
|
59
|
+
schema.$id,
|
|
60
|
+
response._data.name,
|
|
61
|
+
response._data.description,
|
|
62
|
+
)
|
|
63
|
+
if (response_error_function) {
|
|
64
|
+
await response_error_function(response)
|
|
65
|
+
}
|
|
66
|
+
},
|
|
72
67
|
})
|
|
73
68
|
}
|
|
74
69
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { useAppConfig } from "nuxt/app"
|
|
2
|
+
|
|
1
3
|
export async function upload_file(
|
|
2
4
|
{ route, file },
|
|
3
5
|
{ request_error_function, response_function, response_error_function } = {},
|
|
4
6
|
) {
|
|
7
|
+
console.log("upload_file", route, file)
|
|
5
8
|
const feedback_store = use_feedback_store()
|
|
6
9
|
const geode_store = use_geode_store()
|
|
7
10
|
if (!(file instanceof File)) {
|
|
@@ -17,10 +20,14 @@ export async function upload_file(
|
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
geode_store.start_request()
|
|
20
|
-
return
|
|
23
|
+
return $fetch(route, {
|
|
21
24
|
baseURL: geode_store.base_url,
|
|
22
25
|
...request_options,
|
|
26
|
+
onRequest({ request }) {
|
|
27
|
+
console.log("onRequest", request)
|
|
28
|
+
},
|
|
23
29
|
onRequestError({ error }) {
|
|
30
|
+
console.log("onRequestError", error)
|
|
24
31
|
geode_store.stop_request()
|
|
25
32
|
feedback_store.add_error(error.code, route, error.message, error.stack)
|
|
26
33
|
if (request_error_function) {
|
|
@@ -28,6 +35,7 @@ export async function upload_file(
|
|
|
28
35
|
}
|
|
29
36
|
},
|
|
30
37
|
onResponse({ response }) {
|
|
38
|
+
console.log("onResponse", response)
|
|
31
39
|
if (response.ok) {
|
|
32
40
|
geode_store.stop_request()
|
|
33
41
|
if (response_function) {
|
|
@@ -36,6 +44,7 @@ export async function upload_file(
|
|
|
36
44
|
}
|
|
37
45
|
},
|
|
38
46
|
onResponseError({ response }) {
|
|
47
|
+
console.log("onResponseError", response)
|
|
39
48
|
geode_store.stop_request()
|
|
40
49
|
feedback_store.add_error(
|
|
41
50
|
response.status,
|
package/nuxt.config.js
CHANGED
package/package.json
CHANGED
|
@@ -7,29 +7,28 @@
|
|
|
7
7
|
"geode_objects": "node scripts/generate_geode_objects.js && prettier ./assets/geode_objects.js --write"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@nuxt/test-utils": "^3.
|
|
11
|
-
"@pinia/testing": "^0.1
|
|
12
|
-
"@vitejs/plugin-vue": "^5.2.
|
|
13
|
-
"@vitest/coverage-v8": "^3.0.8",
|
|
10
|
+
"@nuxt/test-utils": "^3.18.0",
|
|
11
|
+
"@pinia/testing": "^1.0.1",
|
|
12
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
14
13
|
"@vue/test-utils": "^2.4.6",
|
|
15
|
-
"eslint": "^
|
|
16
|
-
"eslint-plugin-import": "^2.
|
|
14
|
+
"eslint": "^9.26.0",
|
|
15
|
+
"eslint-plugin-import": "^2.31.0",
|
|
17
16
|
"eslint-plugin-nuxt": "^4.0.0",
|
|
18
|
-
"eslint-plugin-prettier": "^5.
|
|
17
|
+
"eslint-plugin-prettier": "^5.4.0",
|
|
19
18
|
"eslint-plugin-prettier-vue": "^5.0.0",
|
|
20
|
-
"eslint-plugin-vue": "^
|
|
21
|
-
"eslint-plugin-vuetify": "^2.
|
|
22
|
-
"happy-dom": "^
|
|
23
|
-
"jsdom": "^
|
|
24
|
-
"nuxt": "
|
|
25
|
-
"playwright-core": "^1.
|
|
26
|
-
"prettier": "3.3.
|
|
19
|
+
"eslint-plugin-vue": "^10.1.0",
|
|
20
|
+
"eslint-plugin-vuetify": "^2.5.2",
|
|
21
|
+
"happy-dom": "^17.4.6",
|
|
22
|
+
"jsdom": "^26.1.0",
|
|
23
|
+
"nuxt": "3.17.2",
|
|
24
|
+
"playwright-core": "^1.52.0",
|
|
25
|
+
"prettier": "3.3.3",
|
|
27
26
|
"resize-observer-polyfill": "^1.5.1",
|
|
28
|
-
"vite": "^6.
|
|
29
|
-
"vite-plugin-vuetify": "^2.
|
|
30
|
-
"vitest": "^3.
|
|
27
|
+
"vite": "^6.3.5",
|
|
28
|
+
"vite-plugin-vuetify": "^2.1.1",
|
|
29
|
+
"vitest": "^3.1.2",
|
|
31
30
|
"vitest-environment-nuxt": "^1.0.1",
|
|
32
|
-
"vuetify": "^3.
|
|
31
|
+
"vuetify": "^3.8.3",
|
|
33
32
|
"wslink": "1.12.4"
|
|
34
33
|
},
|
|
35
34
|
"overrides": {
|
|
@@ -37,23 +36,23 @@
|
|
|
37
36
|
},
|
|
38
37
|
"description": "OpenSource Vue/Vuetify framework for web applications",
|
|
39
38
|
"type": "module",
|
|
40
|
-
"version": "9.7.
|
|
39
|
+
"version": "9.7.1-rc.2",
|
|
41
40
|
"main": "./nuxt.config.js",
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@geode/opengeodeweb-back": "5.
|
|
44
|
-
"@geode/opengeodeweb-viewer": "1.6.
|
|
42
|
+
"@geode/opengeodeweb-back": "5.7.0",
|
|
43
|
+
"@geode/opengeodeweb-viewer": "1.6.3",
|
|
45
44
|
"@kitware/vtk.js": "30.3.1",
|
|
46
45
|
"@mdi/font": "^7.4.47",
|
|
47
|
-
"@pinia/nuxt": "^0.
|
|
48
|
-
"@types/node": "^22.
|
|
49
|
-
"@vueuse/components": "^
|
|
50
|
-
"@vueuse/nuxt": "^
|
|
46
|
+
"@pinia/nuxt": "^0.11.0",
|
|
47
|
+
"@types/node": "^22.15.3",
|
|
48
|
+
"@vueuse/components": "^13.1.0",
|
|
49
|
+
"@vueuse/nuxt": "^13.1.0",
|
|
51
50
|
"ajv": "^8.17.1",
|
|
52
51
|
"is-electron": "^2.2.2",
|
|
53
52
|
"js-file-download": "^0.4.12",
|
|
54
|
-
"pinia": "^
|
|
55
|
-
"sass": "^1.
|
|
56
|
-
"semver": "^7.
|
|
53
|
+
"pinia": "^3.0.2",
|
|
54
|
+
"sass": "^1.87.0",
|
|
55
|
+
"semver": "^7.7.1",
|
|
57
56
|
"uuid": "^11.1.0",
|
|
58
57
|
"vue-recaptcha": "^2.0.3",
|
|
59
58
|
"vue3-carousel": "^0.3.3"
|
|
@@ -15,7 +15,8 @@ var geode_objects = "const geode_objects = {"
|
|
|
15
15
|
for (const file of files) {
|
|
16
16
|
const geode_object = file.replace(".svg", "")
|
|
17
17
|
imports +=
|
|
18
|
-
`import ${geode_object} from "
|
|
18
|
+
`import ${geode_object} from "@ogw_f/assets/img/geode_objects/${file}"` +
|
|
19
|
+
"\n"
|
|
19
20
|
geode_objects += `${geode_object}:{\n tooltip: "${geode_object}",\n image: ${geode_object},\n},\n`
|
|
20
21
|
}
|
|
21
22
|
geode_objects += "}\n\n export default geode_objects"
|
package/stores/geode.js
CHANGED
package/stores/infra.js
CHANGED
package/stores/viewer.js
CHANGED
|
@@ -2,7 +2,7 @@ import _ from "lodash"
|
|
|
2
2
|
import vtkWSLinkClient from "@kitware/vtk.js/IO/Core/WSLinkClient"
|
|
3
3
|
import "@kitware/vtk.js/Rendering/OpenGL/Profiles/Geometry"
|
|
4
4
|
import schemas from "@geode/opengeodeweb-viewer/schemas.json"
|
|
5
|
-
import Status from "
|
|
5
|
+
import Status from "@ogw_f/utils/status.js"
|
|
6
6
|
|
|
7
7
|
export const use_viewer_store = defineStore("viewer", {
|
|
8
8
|
state: () => ({
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
|
|
@@ -9,7 +7,7 @@ import { createVuetify } from "vuetify"
|
|
|
9
7
|
import * as components from "vuetify/components"
|
|
10
8
|
import * as directives from "vuetify/directives"
|
|
11
9
|
|
|
12
|
-
import CrsSelector from "
|
|
10
|
+
import CrsSelector from "@ogw_f/components/CrsSelector.vue"
|
|
13
11
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
14
12
|
|
|
15
13
|
const crs_selector_schema =
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
|
|
@@ -9,7 +7,7 @@ import * as directives from "vuetify/directives"
|
|
|
9
7
|
import { setActivePinia } from "pinia"
|
|
10
8
|
import { createTestingPinia } from "@pinia/testing"
|
|
11
9
|
|
|
12
|
-
import ExtensionSelector from "
|
|
10
|
+
import ExtensionSelector from "@ogw_f/components/ExtensionSelector.vue"
|
|
13
11
|
|
|
14
12
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
15
13
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test, vi } from "vitest"
|
|
4
2
|
import { mount } from "@vue/test-utils"
|
|
5
3
|
import { createVuetify } from "vuetify"
|
|
@@ -7,7 +5,7 @@ import * as components from "vuetify/components"
|
|
|
7
5
|
import * as directives from "vuetify/directives"
|
|
8
6
|
import { createTestingPinia } from "@pinia/testing"
|
|
9
7
|
|
|
10
|
-
import FeedBackErrorBanner from "
|
|
8
|
+
import FeedBackErrorBanner from "@ogw_f/components/FeedBack/ErrorBanner.vue"
|
|
11
9
|
|
|
12
10
|
const vuetify = createVuetify({
|
|
13
11
|
components,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { mount } from "@vue/test-utils"
|
|
5
3
|
import { createVuetify } from "vuetify"
|
|
@@ -7,7 +5,7 @@ import * as components from "vuetify/components"
|
|
|
7
5
|
import * as directives from "vuetify/directives"
|
|
8
6
|
import { createTestingPinia } from "@pinia/testing"
|
|
9
7
|
|
|
10
|
-
import FeedBackSnackers from "
|
|
8
|
+
import FeedBackSnackers from "@ogw_f/components/FeedBack/Snackers.vue"
|
|
11
9
|
|
|
12
10
|
const vuetify = createVuetify({
|
|
13
11
|
components,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test, vi } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
import { flushPromises } from "@vue/test-utils"
|
|
@@ -11,8 +9,8 @@ import * as directives from "vuetify/directives"
|
|
|
11
9
|
import { setActivePinia } from "pinia"
|
|
12
10
|
import { createTestingPinia } from "@pinia/testing"
|
|
13
11
|
|
|
14
|
-
import FileSelector from "
|
|
15
|
-
import FileUploader from "
|
|
12
|
+
import FileSelector from "@ogw_f/components/FileSelector.vue"
|
|
13
|
+
import FileUploader from "@ogw_f/components/FileUploader.vue"
|
|
16
14
|
|
|
17
15
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
18
16
|
|
|
@@ -60,6 +58,7 @@ describe("FileSelector.vue", async () => {
|
|
|
60
58
|
const v_btn = wrapper.findComponent(components.VBtn)
|
|
61
59
|
await v_btn.trigger("click")
|
|
62
60
|
await flushPromises()
|
|
61
|
+
await flushPromises()
|
|
63
62
|
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
64
63
|
expect(wrapper.emitted().update_values).toHaveLength(1)
|
|
65
64
|
expect(wrapper.emitted().update_values[0][0]).toEqual({
|
|
@@ -83,7 +82,6 @@ describe("FileSelector.vue", async () => {
|
|
|
83
82
|
|
|
84
83
|
const files = [new File(["fake_file"], "fake_file.txt")]
|
|
85
84
|
test("auto_upload true", async () => {
|
|
86
|
-
const auto_upload = true
|
|
87
85
|
const wrapper = await mountSuspended(FileSelector, {
|
|
88
86
|
global: {
|
|
89
87
|
plugins: [vuetify, pinia],
|
|
@@ -92,7 +90,7 @@ describe("FileSelector.vue", async () => {
|
|
|
92
90
|
multiple: false,
|
|
93
91
|
supported_feature: "test",
|
|
94
92
|
files: files,
|
|
95
|
-
auto_upload,
|
|
93
|
+
auto_upload: true,
|
|
96
94
|
},
|
|
97
95
|
})
|
|
98
96
|
|
|
@@ -107,7 +105,6 @@ describe("FileSelector.vue", async () => {
|
|
|
107
105
|
})
|
|
108
106
|
|
|
109
107
|
test("auto_upload false", async () => {
|
|
110
|
-
const auto_upload = false
|
|
111
108
|
const wrapper = await mountSuspended(FileSelector, {
|
|
112
109
|
global: {
|
|
113
110
|
plugins: [vuetify, pinia],
|
|
@@ -116,7 +113,7 @@ describe("FileSelector.vue", async () => {
|
|
|
116
113
|
multiple: false,
|
|
117
114
|
supported_feature: "test",
|
|
118
115
|
files: files,
|
|
119
|
-
auto_upload,
|
|
116
|
+
auto_upload: false,
|
|
120
117
|
},
|
|
121
118
|
})
|
|
122
119
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
import { flushPromises } from "@vue/test-utils"
|
|
@@ -10,7 +8,7 @@ import * as directives from "vuetify/directives"
|
|
|
10
8
|
import { setActivePinia } from "pinia"
|
|
11
9
|
import { createTestingPinia } from "@pinia/testing"
|
|
12
10
|
|
|
13
|
-
import FileUploader from "
|
|
11
|
+
import FileUploader from "@ogw_f/components/FileUploader.vue"
|
|
14
12
|
|
|
15
13
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
16
14
|
|
|
@@ -56,6 +54,7 @@ describe("FileUploader.vue", async () => {
|
|
|
56
54
|
|
|
57
55
|
await v_btn.trigger("click")
|
|
58
56
|
await flushPromises()
|
|
57
|
+
await flushPromises()
|
|
59
58
|
expect(wrapper.emitted().files_uploaded[0][0]).toEqual(files)
|
|
60
59
|
})
|
|
61
60
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
import { flushPromises } from "@vue/test-utils"
|
|
@@ -10,7 +8,7 @@ import * as directives from "vuetify/directives"
|
|
|
10
8
|
import { setActivePinia } from "pinia"
|
|
11
9
|
import { createTestingPinia } from "@pinia/testing"
|
|
12
10
|
|
|
13
|
-
import InspectorInspectionButton from "
|
|
11
|
+
import InspectorInspectionButton from "@ogw_f/components/Inspector/InspectionButton.vue"
|
|
14
12
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
15
13
|
const schema = schemas.opengeodeweb_back.inspect_file
|
|
16
14
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
|
|
@@ -7,7 +5,7 @@ import { createVuetify } from "vuetify"
|
|
|
7
5
|
import * as components from "vuetify/components"
|
|
8
6
|
import * as directives from "vuetify/directives"
|
|
9
7
|
|
|
10
|
-
import InspectorResultPanel from "
|
|
8
|
+
import InspectorResultPanel from "@ogw_f/components/Inspector/ResultPanel.vue"
|
|
11
9
|
|
|
12
10
|
const vuetify = createVuetify({
|
|
13
11
|
components,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test, vi } from "vitest"
|
|
4
2
|
import { flushPromises } from "@vue/test-utils"
|
|
5
3
|
import { mountSuspended } from "@nuxt/test-utils/runtime"
|
|
@@ -8,7 +6,7 @@ import { createVuetify } from "vuetify"
|
|
|
8
6
|
import * as components from "vuetify/components"
|
|
9
7
|
import * as directives from "vuetify/directives"
|
|
10
8
|
|
|
11
|
-
import Launcher from "
|
|
9
|
+
import Launcher from "@ogw_f/components/Launcher.vue"
|
|
12
10
|
|
|
13
11
|
const vuetify = createVuetify({
|
|
14
12
|
components,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
import { flushPromises } from "@vue/test-utils"
|
|
@@ -10,8 +8,8 @@ import * as directives from "vuetify/directives"
|
|
|
10
8
|
import { setActivePinia } from "pinia"
|
|
11
9
|
import { createTestingPinia } from "@pinia/testing"
|
|
12
10
|
|
|
13
|
-
import MissingFilesSelector from "
|
|
14
|
-
import FileUploader from "
|
|
11
|
+
import MissingFilesSelector from "@ogw_f/components/MissingFilesSelector.vue"
|
|
12
|
+
import FileUploader from "@ogw_f/components/FileUploader.vue"
|
|
15
13
|
|
|
16
14
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
17
15
|
|
|
@@ -65,6 +63,7 @@ describe("MissingFilesSelector.vue", async () => {
|
|
|
65
63
|
})
|
|
66
64
|
await v_btn.trigger("click")
|
|
67
65
|
await flushPromises()
|
|
66
|
+
await flushPromises()
|
|
68
67
|
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
69
68
|
expect(wrapper.emitted().update_values).toHaveLength(1)
|
|
70
69
|
expect(wrapper.emitted().update_values[0][0]).toEqual({
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
import { flushPromises } from "@vue/test-utils"
|
|
@@ -10,7 +8,7 @@ import * as directives from "vuetify/directives"
|
|
|
10
8
|
import { setActivePinia } from "pinia"
|
|
11
9
|
import { createTestingPinia } from "@pinia/testing"
|
|
12
10
|
|
|
13
|
-
import ObjectSelector from "
|
|
11
|
+
import ObjectSelector from "@ogw_f/components/ObjectSelector.vue"
|
|
14
12
|
|
|
15
13
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
16
14
|
|
|
@@ -74,7 +72,11 @@ describe("ObjectSelector.vue", async () => {
|
|
|
74
72
|
const v_card = wrapper.findComponent(components.VCard)
|
|
75
73
|
const v_img = v_card.findComponent(components.VImg)
|
|
76
74
|
expect(v_img.vm.src).toContain(`${geode_object_1}.svg`)
|
|
75
|
+
await flushPromises()
|
|
76
|
+
await flushPromises()
|
|
77
77
|
await v_card.trigger("click")
|
|
78
|
+
await flushPromises()
|
|
79
|
+
await flushPromises()
|
|
78
80
|
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
79
81
|
expect(wrapper.emitted().update_values).toHaveLength(1)
|
|
80
82
|
expect(wrapper.emitted().update_values[0][0]).toEqual({
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime"
|
|
5
3
|
|
|
@@ -10,7 +8,7 @@ import * as directives from "vuetify/directives"
|
|
|
10
8
|
import { setActivePinia } from "pinia"
|
|
11
9
|
import { createTestingPinia } from "@pinia/testing"
|
|
12
10
|
|
|
13
|
-
import PackagesVersions from "
|
|
11
|
+
import PackagesVersions from "@ogw_f/components/PackagesVersions.vue"
|
|
14
12
|
|
|
15
13
|
const vuetify = createVuetify({
|
|
16
14
|
components,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { mount } from "@vue/test-utils"
|
|
5
3
|
|
|
@@ -7,8 +5,8 @@ import { createVuetify } from "vuetify"
|
|
|
7
5
|
import * as components from "vuetify/components"
|
|
8
6
|
import * as directives from "vuetify/directives"
|
|
9
7
|
|
|
10
|
-
import Step from "
|
|
11
|
-
import ObjectSelector from "
|
|
8
|
+
import Step from "@ogw_f/components/Step.vue"
|
|
9
|
+
import ObjectSelector from "@ogw_f/components/ObjectSelector.vue"
|
|
12
10
|
|
|
13
11
|
const vuetify = createVuetify({
|
|
14
12
|
components,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @vitest-environment nuxt
|
|
2
|
-
|
|
3
1
|
import { describe, expect, test } from "vitest"
|
|
4
2
|
import { mountSuspended } from "@vue/test-utils"
|
|
5
3
|
|
|
@@ -7,8 +5,8 @@ import { createVuetify } from "vuetify"
|
|
|
7
5
|
import * as components from "vuetify/components"
|
|
8
6
|
import * as directives from "vuetify/directives"
|
|
9
7
|
|
|
10
|
-
import Stepper from "
|
|
11
|
-
import ObjectSelector from "
|
|
8
|
+
import Stepper from "@ogw_f/components/Stepper.vue"
|
|
9
|
+
import ObjectSelector from "@ogw_f/components/ObjectSelector.vue"
|
|
12
10
|
import { mountSuspended } from "@nuxt/test-utils/runtime"
|
|
13
11
|
|
|
14
12
|
const vuetify = createVuetify({
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
// //
|
|
2
|
-
|
|
3
|
-
// import { describe, expect, test } from "vitest"
|
|
1
|
+
// // import { describe, expect, test } from "vitest"
|
|
4
2
|
// import { mountSuspended } from "@nuxt/test-utils/runtime"
|
|
5
3
|
|
|
6
4
|
// import { createVuetify } from "vuetify"
|
|
7
5
|
// import * as components from "vuetify/components"
|
|
8
6
|
// import * as directives from "vuetify/directives"
|
|
9
7
|
|
|
10
|
-
// // import Wrapper from "
|
|
11
|
-
// import ObjectSelector from "
|
|
8
|
+
// // import Wrapper from "@ogw_f/components/Wrapper.vue"
|
|
9
|
+
// import ObjectSelector from "@ogw_f/components/ObjectSelector.vue"
|
|
12
10
|
|
|
13
11
|
// const vuetify = createVuetify({
|
|
14
12
|
// components,
|
|
@@ -2,7 +2,7 @@ import { describe, expect, test, beforeEach } from "vitest"
|
|
|
2
2
|
import { setActivePinia } from "pinia"
|
|
3
3
|
import { createTestingPinia } from "@pinia/testing"
|
|
4
4
|
import { registerEndpoint } from "@nuxt/test-utils/runtime"
|
|
5
|
-
import { upload_file } from "
|
|
5
|
+
import { upload_file } from "@ogw_f/composables/upload_file"
|
|
6
6
|
import schemas from "@geode/opengeodeweb-back/schemas.json"
|
|
7
7
|
const schema = schemas.opengeodeweb_back.upload_file
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setActivePinia } from "pinia"
|
|
2
2
|
import { createTestingPinia } from "@pinia/testing"
|
|
3
|
-
import { use_feedback_store } from "
|
|
3
|
+
import { use_feedback_store } from "@ogw_f/stores/feedback"
|
|
4
4
|
import { describe, test, expect, expectTypeOf, beforeEach } from "vitest"
|
|
5
5
|
|
|
6
6
|
describe("Feedback Store", () => {
|
|
@@ -2,7 +2,7 @@ import { describe, test, expect, expectTypeOf, beforeEach, vi } from "vitest"
|
|
|
2
2
|
import { registerEndpoint } from "@nuxt/test-utils/runtime"
|
|
3
3
|
import { setActivePinia } from "pinia"
|
|
4
4
|
import { createTestingPinia } from "@pinia/testing"
|
|
5
|
-
import Status from "
|
|
5
|
+
import Status from "@ogw_f/utils/status.js"
|
|
6
6
|
|
|
7
7
|
// Mock navigator.locks API
|
|
8
8
|
const mockLockRequest = vi.fn().mockImplementation(async (name, callback) => {
|