Skip to content

Commit 3450d04

Browse files
committed
test
1 parent 1f3c9d5 commit 3450d04

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"@nuxt/test-utils": "3.20.1",
14-
"@pinia/testing": "0.1.7",
14+
"@pinia/testing": "1.0.3",
1515
"@vitejs/plugin-vue": "5.2.3",
1616
"@vue/test-utils": "2.4.6",
1717
"electron": "36.4.0",
@@ -46,7 +46,7 @@
4646
"@geode/opengeodeweb-viewer": "0.0.0",
4747
"@kitware/vtk.js": "33.3.0",
4848
"@mdi/font": "7.4.47",
49-
"@pinia/nuxt": "0.5.4",
49+
"@pinia/nuxt": "0.11.3",
5050
"@types/node": "22.15.3",
5151
"@vueuse/components": "13.1.0",
5252
"@vueuse/nuxt": "13.1.0",
@@ -55,7 +55,7 @@
5555
"is-electron": "2.2.2",
5656
"js-file-download": "0.4.12",
5757
"nuxt": "3.20.1",
58-
"pinia": "3.0.3",
58+
"pinia": "3.0.4",
5959
"sass": "1.87.0",
6060
"semver": "7.7.1",
6161
"uuid": "11.1.0",

stores/geode.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ export const useGeodeStore = defineStore("geode", {
5555
method: back_schemas.opengeodeweb_back.ping.methods[0],
5656
body: {},
5757
onRequestError({ error }) {
58-
feedback_store.server_error = true
58+
feedback_store.$patch({ server_error: true })
5959
geode_store.status = Status.NOT_CONNECTED
6060
},
6161
onResponse({ response }) {
6262
if (response.ok) {
63-
feedback_store.server_error = false
63+
feedback_store.$patch({ server_error: false })
6464
geode_store.status = Status.CONNECTED
6565
}
6666
},
6767
onResponseError({ response }) {
68-
feedback_store.server_error = true
68+
feedback_store.$patch({ server_error: true })
6969
geode_store.status = Status.NOT_CONNECTED
7070
},
7171
})

tests/unit/components/Launcher.nuxt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as directives from "vuetify/directives"
99
import { setActivePinia } from "pinia"
1010
import { createTestingPinia } from "@pinia/testing"
1111

12-
import Launcher from "@ogw_f/components/Launcher.vue"
12+
import Launcher from "~/components/Launcher.vue"
1313

1414
const vuetify = createVuetify({
1515
components,
@@ -46,7 +46,7 @@ describe("Launcher.vue", async () => {
4646
})
4747
expect(wrapper.exists()).toBe(true)
4848
await infra_store.$patch({ is_captcha_validated: true })
49-
flushPromises()
49+
await flushPromises()
5050
expect(spy_create_backend).toHaveBeenCalled()
5151
})
5252
})

tests/unit/stores/Geode.nuxt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ describe("Geode store", () => {
134134
})
135135
test("response_error", async () => {
136136
const geode_store = useGeodeStore()
137-
const feedback_store = useFeedbackStore()
138137
geode_store.base_url = ""
139138
getFakeCall.mockImplementation(() => {
140139
throw createError({
@@ -144,6 +143,7 @@ describe("Geode store", () => {
144143

145144
await geode_store.do_ping()
146145
expect(geode_store.status).toBe(Status.NOT_CONNECTED)
146+
const feedback_store = useFeedbackStore()
147147
expect(feedback_store.server_error).toBe(true)
148148
})
149149
})

0 commit comments

Comments
 (0)