Skip to content

Commit 4848d55

Browse files
wip
1 parent 1f18156 commit 4848d55

File tree

7 files changed

+20
-6
lines changed

7 files changed

+20
-6
lines changed

app/components/ObjectSelector.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,23 @@
4949
</template>
5050

5151
<script setup>
52-
import geode_objects from "@ogw_front/assets/geode_objects"
5352
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
5453
54+
import geode_objects from "@ogw_front/assets/geode_objects"
5555
import FetchingData from "@ogw_front/components/FetchingData.vue"
56-
5756
import { useGeodeStore } from "@ogw_front/stores/geode"
5857
5958
const schema = schemas.opengeodeweb_back.allowed_objects
6059
6160
const emit = defineEmits(["update_values", "increment_step"])
62-
61+
console.log("ObjectSelector")
6362
const props = defineProps({
6463
filenames: { type: Array, required: true },
6564
supported_feature: { type: String, required: false, default: null },
6665
})
6766
6867
const geodeStore = useGeodeStore()
69-
const { filenames, supported_feature } = props
68+
const { filenames } = props
7069
7170
const loading = ref(false)
7271
const allowed_objects = ref({})
@@ -146,6 +145,7 @@
146145
}
147146
148147
function set_geode_object(geode_object_type) {
148+
console.log("set_geode_object", { geode_object_type })
149149
if (geode_object_type) {
150150
emit("update_values", { geode_object_type })
151151
emit("increment_step")

app/composables/run_function_when_microservices_connected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { useInfraStore } from "@ogw_front/stores/infra"
22
export function run_function_when_microservices_connected(function_to_run) {
33
const infraStore = useInfraStore()
44
const { microservices_connected } = storeToRefs(infraStore)
5+
console.log("inside microservices_connected", microservices_connected.value)
56
if (microservices_connected.value) {
67
function_to_run()
78
} else {
89
watch(microservices_connected, (value) => {
910
if (value) {
11+
console.log("watch microservices_connected", value)
1012
function_to_run()
1113
}
1214
})

app/stores/infra.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const useInfraStore = defineStore("infra", {
1616
return "localhost"
1717
},
1818
microservices_connected() {
19+
console.log("microservices", this.microservices)
1920
return this.microservices.every(
2021
(store) => store.status === Status.CONNECTED,
2122
)

tests/unit/components/Inspector/ResultPanel.nuxt.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ describe("Inspector/ResultPanel.vue", async () => {
3030
})
3131

3232
expect(wrapper.exists()).toBe(true)
33-
expect(wrapper.componentVM.opened_panels._value).toStrictEqual([0])
3433
expect(wrapper.componentVM.props.inspection_result).toStrictEqual(
3534
inspection_result,
3635
)
@@ -58,7 +57,9 @@ describe("Inspector/ResultPanel.vue", async () => {
5857
})
5958

6059
expect(wrapper.exists()).toBe(true)
61-
expect(wrapper.componentVM.opened_panels._value).toStrictEqual([])
60+
61+
console.log({ wrapper })
62+
6263
expect(wrapper.componentVM.props.inspection_result).toStrictEqual(
6364
inspection_result,
6465
)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ describe("ObjectSelector.vue", async () => {
8383
await flushPromises()
8484
await flushPromises()
8585
expect(wrapper.emitted()).toHaveProperty("update_values")
86+
console.log(
87+
"wrapper.emitted().update_values",
88+
wrapper.emitted().update_values,
89+
)
8690
expect(wrapper.emitted().update_values).toHaveLength(1)
8791
expect(wrapper.emitted().update_values[0][0]).toEqual({
8892
geode_object_type: geode_object_1,

tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@ describe("run_function_when_microservices_connected", () => {
5454
test("microservices not connected", async () => {
5555
const geodeStore = useGeodeStore()
5656
const viewerStore = useViewerStore()
57+
const infraStore = useInfraStore()
5758
const spy = vi.spyOn(dumb_obj, "dumb_method")
5859
run_function_when_microservices_connected(dumb_obj.dumb_method)
5960
await geodeStore.$patch({ status: Status.NOT_CONNECTED })
6061
await viewerStore.$patch({ status: Status.NOT_CONNECTED })
62+
console.log("geodeStore", geodeStore.status)
63+
console.log("viewerStore", viewerStore.status)
64+
65+
console.log("microservices_connected", infraStore.microservices_connected)
6166
expect(spy).not.toHaveBeenCalled()
6267
})
6368
})

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ describe("Lambda Store", () => {
7676
useRuntimeConfig().public.SITE_BRANCH = "/test"
7777
useRuntimeConfig().public.PROJECT = "/project"
7878

79+
lambdaStore.base_url = "test-base-url"
7980
registerEndpoint(lambdaStore.base_url, {
8081
method: "POST",
8182
handler: postFakeCall,

0 commit comments

Comments
 (0)