@geode/opengeodeweb-front 9.0.0-rc.2 → 9.0.0-rc.4

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.
@@ -29,41 +29,46 @@ export function api_fetch(
29
29
  if (schema.max_retry) {
30
30
  request_options.max_retry = schema.max_retry
31
31
  }
32
- return useFetch(schema.$id, {
33
- baseURL: geode_store.base_url,
34
- ...request_options,
35
- onRequestError({ error }) {
36
- geode_store.stop_request()
37
- feedback_store.add_error(
38
- error.code,
39
- schema.$id,
40
- error.message,
41
- error.stack,
42
- )
43
- if (request_error_function) {
44
- request_error_function(error)
45
- }
46
- },
47
- onResponse({ response }) {
48
- if (response.ok) {
49
- geode_store.stop_request()
50
- if (response_function) {
51
- response_function(response)
32
+ return new Promise((resolve, reject) => {
33
+ useFetch(schema.$id, {
34
+ baseURL: geode_store.base_url,
35
+ ...request_options,
36
+ async onRequestError({ error }) {
37
+ await geode_store.stop_request()
38
+ await feedback_store.add_error(
39
+ error.code,
40
+ schema.$id,
41
+ error.message,
42
+ error.stack,
43
+ )
44
+ if (request_error_function) {
45
+ await request_error_function(error)
52
46
  }
53
- }
54
- },
55
- onResponseError({ response }) {
56
- geode_store.stop_request()
57
- 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
- response_error_function(response)
65
- }
66
- },
47
+ reject(error)
48
+ },
49
+ async onResponse({ response }) {
50
+ if (response.ok) {
51
+ await geode_store.stop_request()
52
+ if (response_function) {
53
+ await response_function(response)
54
+ }
55
+ resolve(response)
56
+ }
57
+ },
58
+ async onResponseError({ response }) {
59
+ await geode_store.stop_request()
60
+ await feedback_store.add_error(
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
+ })
67
72
  })
68
73
  }
69
74
 
package/nuxt.config.js CHANGED
@@ -9,7 +9,10 @@ export default defineNuxtConfig({
9
9
  },
10
10
  },
11
11
 
12
- modules: [["@pinia/nuxt", { autoImports: ["defineStore"] }], "@vueuse/nuxt"],
12
+ modules: [
13
+ ["@pinia/nuxt", { autoImports: ["defineStore", "storeToRefs"] }],
14
+ "@vueuse/nuxt",
15
+ ],
13
16
  imports: {
14
17
  dirs: ["stores"],
15
18
  },
package/package.json CHANGED
@@ -7,8 +7,9 @@
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.13.1",
11
- "@vitejs/plugin-vue": "^5.0.5",
10
+ "@nuxt/test-utils": "^3.14.1",
11
+ "@pinia/testing": "^0.1.5",
12
+ "@vitejs/plugin-vue": "^5.1.3",
12
13
  "@vitest/coverage-v8": "^1.6.0",
13
14
  "@vue/test-utils": "^2.4.6",
14
15
  "eslint": "^8.57.0",
@@ -28,6 +29,7 @@
28
29
  "vite-plugin-vuetify": "^2.0.3",
29
30
  "vitest": "^1.6.0",
30
31
  "vitest-environment-nuxt": "^1.0.0",
32
+ "vuetify": "^3.6.9",
31
33
  "wslink": "1.12.4"
32
34
  },
33
35
  "overrides": {
@@ -35,25 +37,24 @@
35
37
  },
36
38
  "description": "OpenSource Vue/Vuetify framework for web applications",
37
39
  "type": "module",
38
- "version": "9.0.0-rc.2",
40
+ "version": "9.0.0-rc.4",
39
41
  "main": "./nuxt.config.js",
40
42
  "dependencies": {
41
- "@geode/opengeodeweb-back": "4.3.0",
42
- "@geode/opengeodeweb-viewer": "0.1.2",
43
+ "@geode/opengeodeweb-back": "5.0.0",
44
+ "@geode/opengeodeweb-viewer": "0.2.0",
43
45
  "@kitware/vtk.js": "30.3.1",
44
46
  "@mdi/font": "^7.4.47",
45
- "@pinia/nuxt": "^0.5.1",
46
- "@types/node": "^20.14.2",
47
- "@vueuse/components": "^10.11.0",
48
- "@vueuse/nuxt": "^10.11.0",
49
- "ajv": "^8.16.0",
47
+ "@pinia/nuxt": "^0.5.4",
48
+ "@types/node": "^22.5.1",
49
+ "@vueuse/components": "^11.0.3",
50
+ "@vueuse/nuxt": "^11.0.3",
51
+ "ajv": "^8.17.1",
50
52
  "is-electron": "^2.2.2",
51
- "pinia": "^2.1.7",
52
- "sass": "^1.77.5",
53
- "semver": "^7.6.2",
53
+ "pinia": "^2.2.2",
54
+ "sass": "^1.77.8",
55
+ "semver": "^7.6.3",
54
56
  "vue-recaptcha": "^2.0.3",
55
- "vue3-carousel": "^0.3.3",
56
- "vuetify": "^3.6.9"
57
+ "vue3-carousel": "^0.3.3"
57
58
  },
58
59
  "repository": {
59
60
  "type": "git",
@@ -4,8 +4,8 @@ export const use_feedback_store = defineStore("feedback", {
4
4
  server_error: false,
5
5
  }),
6
6
  actions: {
7
- add_error(code, route, name, description) {
8
- this.feedbacks.push({
7
+ async add_error(code, route, name, description) {
8
+ await this.feedbacks.push({
9
9
  type: "error",
10
10
  code,
11
11
  route,
@@ -13,16 +13,16 @@ export const use_feedback_store = defineStore("feedback", {
13
13
  description,
14
14
  })
15
15
  },
16
- add_success(description) {
17
- this.feedbacks.push({
16
+ async add_success(description) {
17
+ await this.feedbacks.push({
18
18
  type: "success",
19
19
  description,
20
20
  })
21
21
  },
22
- delete_feedback(feedback_index) {
23
- this.feedbacks.splice(feedback_index, 1)
22
+ async delete_feedback(feedback_index) {
23
+ await this.feedbacks.splice(feedback_index, 1)
24
24
  },
25
- delete_server_error() {
25
+ async delete_server_error() {
26
26
  this.server_error = false
27
27
  },
28
28
  },
package/stores/geode.js CHANGED
@@ -1,16 +1,33 @@
1
+ import back_schemas from "@geode/opengeodeweb-back/schemas.json"
2
+
1
3
  export const use_geode_store = defineStore("geode", {
2
4
  state: () => ({
3
- PROTOCOL: use_infra_store().is_cloud ? "https" : "http",
4
- PORT: use_infra_store().is_cloud ? "443" : "5000",
5
+ default_local_port: "5000",
5
6
  request_counter: 0,
6
7
  is_running: false,
7
8
  }),
8
9
  getters: {
10
+ protocol() {
11
+ if (use_infra_store().is_cloud) {
12
+ return "https"
13
+ } else {
14
+ return "http"
15
+ }
16
+ },
17
+ port() {
18
+ if (use_infra_store().is_cloud) {
19
+ return "443"
20
+ } else {
21
+ return this.default_local_port
22
+ }
23
+ },
9
24
  base_url() {
10
25
  const infra_store = use_infra_store()
11
- const api_url = infra_store.api_url
12
- var geode_url = `${api_url}`
26
+ var geode_url = `${this.protocol}://${infra_store.domain_name}:${this.port}`
13
27
  if (infra_store.is_cloud) {
28
+ if (infra_store.ID == "") {
29
+ throw new Error("ID must not be empty in cloud mode")
30
+ }
14
31
  geode_url += `/${infra_store.ID}/geode`
15
32
  }
16
33
  return geode_url
@@ -25,16 +42,22 @@ export const use_geode_store = defineStore("geode", {
25
42
  },
26
43
  async do_ping() {
27
44
  const feedback_store = use_feedback_store()
28
- const { data } = await useFetch(`${this.base_url}/ping`, {
29
- method: "POST",
30
- })
31
- if (data.value !== null) {
32
- this.is_running = true
33
- return
34
- } else {
35
- feedback_store.$patch({ server_error: true })
36
- return
37
- }
45
+ await api_fetch(
46
+ { schema: back_schemas.opengeodeweb_back.ping, params: {} },
47
+ {
48
+ request_error_function: async () => {
49
+ await feedback_store.$patch({ server_error: true })
50
+ this.is_running = false
51
+ },
52
+ response_function: async () => {
53
+ this.is_running = true
54
+ },
55
+ response_error_function: async () => {
56
+ await feedback_store.$patch({ server_error: true })
57
+ this.is_running = false
58
+ },
59
+ },
60
+ )
38
61
  },
39
62
  start_request() {
40
63
  this.request_counter++
package/stores/infra.js CHANGED
@@ -11,22 +11,26 @@ export const use_infra_store = defineStore("infra", {
11
11
  is_cloud() {
12
12
  return !isElectron() && !process.env.NODE_ENV === "development"
13
13
  },
14
- domain_name() {
15
- if (this.is_cloud) {
14
+ domain_name(state) {
15
+ if (state.is_cloud) {
16
16
  return useRuntimeConfig().public.API_URL
17
17
  } else {
18
18
  return "localhost"
19
19
  }
20
20
  },
21
-
22
- api_url() {
21
+ lambda_url(state) {
23
22
  const geode_store = use_geode_store()
24
23
  const public_runtime_config = useRuntimeConfig().public
25
- if (public_runtime_config.NODE_ENV == "test") {
26
- return ""
27
- }
28
- var api_url = `${geode_store.PROTOCOL}://${this.domain_name}:${geode_store.PORT}`
29
- return api_url
24
+ const url =
25
+ geode_store.protocol +
26
+ "://" +
27
+ state.domain_name +
28
+ ":" +
29
+ geode_store.port +
30
+ public_runtime_config.SITE_BRANCH +
31
+ public_runtime_config.PROJECT +
32
+ "/createbackend"
33
+ return url
30
34
  },
31
35
  is_running() {
32
36
  return use_geode_store().is_running && use_viewer_store().is_running
@@ -42,21 +46,14 @@ export const use_infra_store = defineStore("infra", {
42
46
  return
43
47
  }
44
48
  this.is_connexion_launched = true
45
- if (
46
- this.ID === "" ||
47
- this.ID === null ||
48
- typeof this.ID === "undefined"
49
- ) {
49
+ if (["", null].includes(this.ID) || typeof this.ID === "undefined") {
50
50
  return this.create_backend()
51
51
  } else {
52
- const { data, error } = await useFetch(`${geode_store.base_url}/`, {
53
- method: "POST",
54
- })
55
- if (data.value !== null) {
56
- geode_store.is_running = true
52
+ try {
53
+ await geode_store.do_ping()
57
54
  return geode_store.ping_task()
58
- } else {
59
- await this.create_backend()
55
+ } catch (e) {
56
+ return this.create_backend()
60
57
  }
61
58
  }
62
59
  },
@@ -66,19 +63,15 @@ export const use_infra_store = defineStore("infra", {
66
63
  const feedback_store = use_feedback_store()
67
64
 
68
65
  if (isElectron()) {
69
- await window.electronAPI.run_back(geode_store.PORT)
70
- await window.electronAPI.run_viewer(viewer_store.PORT)
71
- // geode_store.$patch({ is_running: true })
72
- // viewer_store.$patch({ is_running: true })
66
+ const back_port = await window.electronAPI.run_back(geode_store.port)
67
+ geode_store.$patch({ default_local_port: back_port })
68
+ const viewer_port = await window.electronAPI.run_viewer(
69
+ viewer_store.port,
70
+ )
71
+ viewer_store.$patch({ default_local_port: viewer_port })
73
72
  return
74
73
  } else {
75
- const public_runtime_config = useRuntimeConfig().public
76
- const url = this.api_url.concat(
77
- public_runtime_config.SITE_BRANCH,
78
- public_runtime_config.PROJECT,
79
- "/createbackend",
80
- )
81
- const { data, error } = await useFetch(url, {
74
+ const { data, error } = await useFetch(this.lambda_url, {
82
75
  method: "POST",
83
76
  })
84
77
  if (data.value !== null) {
package/stores/viewer.js CHANGED
@@ -5,8 +5,7 @@ import schemas from "@geode/opengeodeweb-viewer/schemas.json"
5
5
 
6
6
  export const use_viewer_store = defineStore("viewer", {
7
7
  state: () => ({
8
- PROTOCOL: use_infra_store().is_cloud ? "wss" : "ws",
9
- PORT: use_infra_store().is_cloud ? "443" : "1234",
8
+ default_local_port: "1234",
10
9
  client: {},
11
10
  config: null,
12
11
  is_running: false,
@@ -15,10 +14,27 @@ export const use_viewer_store = defineStore("viewer", {
15
14
  request_counter: 0,
16
15
  }),
17
16
  getters: {
17
+ protocol() {
18
+ if (use_infra_store().is_cloud) {
19
+ return "wss"
20
+ } else {
21
+ return "ws"
22
+ }
23
+ },
24
+ port(state) {
25
+ if (use_infra_store().is_cloud) {
26
+ return "443"
27
+ } else {
28
+ return state.default_local_port
29
+ }
30
+ },
18
31
  base_url(state) {
19
32
  const infra_store = use_infra_store()
20
- var viewer_url = `${state.PROTOCOL}://${infra_store.domain_name}:${state.PORT}`
33
+ let viewer_url = `${state.protocol}://${infra_store.domain_name}:${state.port}`
21
34
  if (infra_store.is_cloud) {
35
+ if (infra_store.ID == "") {
36
+ throw new Error("ID must not be empty in cloud mode")
37
+ }
22
38
  viewer_url += `/${infra_store.ID}/viewer`
23
39
  }
24
40
  viewer_url += "/ws"
@@ -3,6 +3,8 @@
3
3
  import { describe, expect, test } from "vitest"
4
4
  import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
5
5
 
6
+ import { setActivePinia } from "pinia"
7
+ import { createTestingPinia } from "@pinia/testing"
6
8
  import { createVuetify } from "vuetify"
7
9
  import * as components from "vuetify/components"
8
10
  import * as directives from "vuetify/directives"
@@ -19,7 +21,12 @@ const vuetify = createVuetify({
19
21
  })
20
22
 
21
23
  describe("CrsSelector.vue", async () => {
22
- test(`BRep`, async () => {
24
+ const pinia = createTestingPinia()
25
+ setActivePinia(pinia)
26
+ const geode_store = use_geode_store()
27
+ geode_store.base_url = ""
28
+
29
+ test(`Default behavior`, async () => {
23
30
  const crs_list = [
24
31
  {
25
32
  authority: "EPSG",
@@ -36,7 +43,7 @@ describe("CrsSelector.vue", async () => {
36
43
  const key_to_update = "key"
37
44
  const wrapper = await mountSuspended(CrsSelector, {
38
45
  global: {
39
- plugins: [vuetify],
46
+ plugins: [vuetify, pinia],
40
47
  },
41
48
  props: { input_geode_object: "BRep", key_to_update },
42
49
  })
@@ -6,6 +6,8 @@ import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
6
6
  import { createVuetify } from "vuetify"
7
7
  import * as components from "vuetify/components"
8
8
  import * as directives from "vuetify/directives"
9
+ import { setActivePinia } from "pinia"
10
+ import { createTestingPinia } from "@pinia/testing"
9
11
 
10
12
  import ExtensionSelector from "@/components/ExtensionSelector.vue"
11
13
 
@@ -19,6 +21,11 @@ const vuetify = createVuetify({
19
21
  })
20
22
 
21
23
  describe("ExtensionSelector.vue", async () => {
24
+ const pinia = createTestingPinia()
25
+ setActivePinia(pinia)
26
+ const geode_store = use_geode_store()
27
+ geode_store.base_url = ""
28
+
22
29
  test(`Select geode_object & extension`, async () => {
23
30
  const output_geode_object = "BRep"
24
31
  const output_extension = "msh"
@@ -33,7 +40,7 @@ describe("ExtensionSelector.vue", async () => {
33
40
  })
34
41
  const wrapper = await mountSuspended(ExtensionSelector, {
35
42
  global: {
36
- plugins: [vuetify],
43
+ plugins: [vuetify, pinia],
37
44
  },
38
45
  props: { input_geode_object: "BRep", filenames: ["test.toto"] },
39
46
  })
@@ -5,6 +5,7 @@ import { mount } from "@vue/test-utils"
5
5
  import { createVuetify } from "vuetify"
6
6
  import * as components from "vuetify/components"
7
7
  import * as directives from "vuetify/directives"
8
+ import { createTestingPinia } from "@pinia/testing"
8
9
 
9
10
  import FeedBackErrorBanner from "@/components/FeedBack/ErrorBanner.vue"
10
11
 
@@ -17,7 +18,7 @@ describe("FeedBackErrorBanner.vue", async () => {
17
18
  test(`Test reload`, async () => {
18
19
  const wrapper = mount(FeedBackErrorBanner, {
19
20
  global: {
20
- plugins: [vuetify],
21
+ plugins: [createTestingPinia(), vuetify],
21
22
  },
22
23
  })
23
24
  const reload_spy = vi.spyOn(wrapper.vm, "reload")
@@ -26,19 +27,26 @@ describe("FeedBackErrorBanner.vue", async () => {
26
27
  expect(feedback_store.server_error).toBe(true)
27
28
  const v_btn = wrapper.findAll(".v-btn")
28
29
  await v_btn[0].trigger("click")
29
-
30
30
  expect(reload_spy).toHaveBeenCalledTimes(1)
31
31
  }),
32
32
  test(`Test delete error`, async () => {
33
33
  const wrapper = mount(FeedBackErrorBanner, {
34
34
  global: {
35
- plugins: [vuetify],
35
+ plugins: [
36
+ createTestingPinia({
37
+ initialState: {
38
+ feedback: {
39
+ server_error: true,
40
+ },
41
+ },
42
+ stubActions: false,
43
+ }),
44
+ vuetify,
45
+ ],
36
46
  },
37
47
  })
38
48
 
39
49
  const feedback_store = use_feedback_store()
40
- await feedback_store.$patch({ server_error: true })
41
- expect(feedback_store.server_error).toBe(true)
42
50
  const v_btn = wrapper.findAll(".v-btn")
43
51
  await v_btn[1].trigger("click")
44
52
  expect(feedback_store.server_error).toBe(false)
@@ -5,6 +5,7 @@ import { mount } from "@vue/test-utils"
5
5
  import { createVuetify } from "vuetify"
6
6
  import * as components from "vuetify/components"
7
7
  import * as directives from "vuetify/directives"
8
+ import { createTestingPinia } from "@pinia/testing"
8
9
 
9
10
  import FeedBackSnackers from "@/components/FeedBack/Snackers.vue"
10
11
 
@@ -25,23 +26,31 @@ describe("FeedBackSnackers.vue", async () => {
25
26
  components: {
26
27
  FeedBackSnackers,
27
28
  },
28
- plugins: [vuetify],
29
+ plugins: [
30
+ createTestingPinia({
31
+ initialState: {
32
+ feedback: {
33
+ feedbacks: [
34
+ {
35
+ type: "error",
36
+ code: 500,
37
+ route: "/test",
38
+ name: "test message",
39
+ description: "test description",
40
+ },
41
+ ],
42
+ },
43
+ },
44
+ stubActions: false,
45
+ }),
46
+ vuetify,
47
+ ],
29
48
  },
30
49
  },
31
50
  )
32
-
33
- console.log("wrapper", wrapper)
34
-
35
51
  const feedback_store = use_feedback_store()
36
- await feedback_store.add_error(
37
- 404,
38
- "/test",
39
- "Test message",
40
- "Test desription",
41
- )
42
52
  expect(feedback_store.feedbacks.length).toBe(1)
43
53
  const v_btn = await wrapper.findComponent(components.VBtn)
44
- console.log("v_btn", v_btn)
45
54
  await v_btn.trigger("click")
46
55
  expect(feedback_store.feedbacks.length).toBe(0)
47
56
  })
@@ -8,6 +8,9 @@ import { createVuetify } from "vuetify"
8
8
  import * as components from "vuetify/components"
9
9
  import * as directives from "vuetify/directives"
10
10
 
11
+ import { setActivePinia } from "pinia"
12
+ import { createTestingPinia } from "@pinia/testing"
13
+
11
14
  import FileSelector from "@/components/FileSelector.vue"
12
15
  import FileUploader from "@/components/FileUploader.vue"
13
16
 
@@ -22,6 +25,11 @@ const vuetify = createVuetify({
22
25
  })
23
26
 
24
27
  describe("FileSelector.vue", async () => {
28
+ const pinia = createTestingPinia()
29
+ setActivePinia(pinia)
30
+ const geode_store = use_geode_store()
31
+ geode_store.base_url = ""
32
+
25
33
  test(`Select file`, async () => {
26
34
  registerEndpoint(allowed_files_schema.$id, {
27
35
  method: allowed_files_schema.methods[0],
@@ -31,7 +39,7 @@ describe("FileSelector.vue", async () => {
31
39
  })
32
40
  const wrapper = await mountSuspended(FileSelector, {
33
41
  global: {
34
- plugins: [vuetify],
42
+ plugins: [vuetify, pinia],
35
43
  },
36
44
  props: { multiple: false, supported_feature: "test" },
37
45
  })
@@ -70,7 +78,7 @@ describe("FileSelector.vue", async () => {
70
78
 
71
79
  const wrapper = await mountSuspended(FileSelector, {
72
80
  global: {
73
- plugins: [vuetify],
81
+ plugins: [vuetify, pinia],
74
82
  },
75
83
  props: { multiple: false, supported_feature: "test", files: files },
76
84
  })
@@ -7,6 +7,8 @@ import { flushPromises } from "@vue/test-utils"
7
7
  import { createVuetify } from "vuetify"
8
8
  import * as components from "vuetify/components"
9
9
  import * as directives from "vuetify/directives"
10
+ import { setActivePinia } from "pinia"
11
+ import { createTestingPinia } from "@pinia/testing"
10
12
 
11
13
  import FileUploader from "@/components/FileUploader.vue"
12
14
 
@@ -20,6 +22,11 @@ const vuetify = createVuetify({
20
22
  })
21
23
 
22
24
  describe("FileUploader.vue", async () => {
25
+ const pinia = createTestingPinia()
26
+ setActivePinia(pinia)
27
+ const geode_store = use_geode_store()
28
+ geode_store.base_url = ""
29
+
23
30
  test(`Upload file`, async () => {
24
31
  registerEndpoint(upload_file_schema.$id, {
25
32
  method: upload_file_schema.methods[0],
@@ -27,7 +34,7 @@ describe("FileUploader.vue", async () => {
27
34
  })
28
35
  const wrapper = await mountSuspended(FileUploader, {
29
36
  global: {
30
- plugins: [vuetify],
37
+ plugins: [vuetify, pinia],
31
38
  },
32
39
  props: { multiple: false, accept: "*.txt" },
33
40
  })
@@ -7,6 +7,8 @@ import { flushPromises } from "@vue/test-utils"
7
7
  import { createVuetify } from "vuetify"
8
8
  import * as components from "vuetify/components"
9
9
  import * as directives from "vuetify/directives"
10
+ import { setActivePinia } from "pinia"
11
+ import { createTestingPinia } from "@pinia/testing"
10
12
 
11
13
  import InspectorInspectionButton from "@/components/Inspector/InspectionButton.vue"
12
14
  import schemas from "@geode/opengeodeweb-back/schemas.json"
@@ -18,6 +20,11 @@ const vuetify = createVuetify({
18
20
  })
19
21
 
20
22
  describe("Inspector/InspectionButton.vue", async () => {
23
+ const pinia = createTestingPinia()
24
+ setActivePinia(pinia)
25
+ const geode_store = use_geode_store()
26
+ geode_store.base_url = ""
27
+
21
28
  test(`Test with issues`, async () => {
22
29
  var inspection_result = {
23
30
  title: "Brep inspection",
@@ -47,7 +54,7 @@ describe("Inspector/InspectionButton.vue", async () => {
47
54
 
48
55
  const wrapper = await mountSuspended(InspectorInspectionButton, {
49
56
  global: {
50
- plugins: [vuetify],
57
+ plugins: [vuetify, pinia],
51
58
  },
52
59
  props: { input_geode_object, filename },
53
60
  })
@@ -7,6 +7,8 @@ import { flushPromises } from "@vue/test-utils"
7
7
  import { createVuetify } from "vuetify"
8
8
  import * as components from "vuetify/components"
9
9
  import * as directives from "vuetify/directives"
10
+ import { setActivePinia } from "pinia"
11
+ import { createTestingPinia } from "@pinia/testing"
10
12
 
11
13
  import MissingFilesSelector from "@/components/MissingFilesSelector.vue"
12
14
  import FileUploader from "@/components/FileUploader.vue"
@@ -22,6 +24,11 @@ const vuetify = createVuetify({
22
24
  })
23
25
 
24
26
  describe("MissingFilesSelector.vue", async () => {
27
+ const pinia = createTestingPinia()
28
+ setActivePinia(pinia)
29
+ const geode_store = use_geode_store()
30
+ geode_store.base_url = ""
31
+
25
32
  test(`Select file`, async () => {
26
33
  registerEndpoint(missing_files_schema.$id, {
27
34
  method: missing_files_schema.methods[0],
@@ -33,7 +40,7 @@ describe("MissingFilesSelector.vue", async () => {
33
40
  })
34
41
  const wrapper = await mountSuspended(MissingFilesSelector, {
35
42
  global: {
36
- plugins: [vuetify],
43
+ plugins: [vuetify, pinia],
37
44
  },
38
45
  props: {
39
46
  multiple: false,