Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c4b1214
wip [skip ci]
JulienChampagnol Dec 19, 2025
4be8923
refactor vuetify imports in tests [skip ci]
JulienChampagnol Dec 19, 2025
8033bfe
test firsts screenshots components
JulienChampagnol Dec 19, 2025
590c671
revert
JulienChampagnol Dec 19, 2025
7465add
deps stable and dev
JulienChampagnol Dec 19, 2025
d9e3210
Apply prepare changes
JulienChampagnol Dec 19, 2025
ca08a64
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Mar 13, 2026
ee7e1e8
Apply prepare changes
JulienChampagnol Mar 13, 2026
0a090f7
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 3, 2026
1464995
Apply prepare changes
JulienChampagnol Apr 3, 2026
9e70476
save wip
JulienChampagnol Apr 3, 2026
10ce3fe
Merge branch 'fix/graphic_tests' of https://github.com/Geode-solution…
JulienChampagnol Apr 3, 2026
f24f641
cleanup eslint
JulienChampagnol Apr 3, 2026
2303117
remove eslint
JulienChampagnol Apr 3, 2026
58c93a8
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 3, 2026
0ad46f8
wip
JulienChampagnol Apr 3, 2026
80edfd5
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 3, 2026
49f4b4c
Apply prepare changes
JulienChampagnol Apr 3, 2026
2f05421
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 7, 2026
b994087
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 7, 2026
2d680fd
wip [skip ci]
JulienChampagnol Apr 7, 2026
23b814a
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 7, 2026
6f8b066
wip [skip ci]
JulienChampagnol Apr 8, 2026
06bb2f9
wip [skip ci]
JulienChampagnol Apr 8, 2026
b170bb0
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 8, 2026
7dd2b82
wip [skip ci]
JulienChampagnol Apr 8, 2026
3da3108
wip [skip ci]
JulienChampagnol Apr 14, 2026
5af3f96
wip [skip ci]
JulienChampagnol Apr 15, 2026
1a4b5de
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 15, 2026
be9e3c7
Apply prepare changes
JulienChampagnol Apr 15, 2026
6340742
wip [skip ci]
JulienChampagnol Apr 16, 2026
4faca38
Merge branch 'fix/graphic_tests' of https://github.com/Geode-solution…
JulienChampagnol Apr 16, 2026
c86e711
Apply prepare changes
JulienChampagnol Apr 16, 2026
9034999
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
"test": "npm run test:unit",
"tests": "vitest --config ./tests/vitest.config.js",
"test:unit": "npm run tests --project unit",
"test:browser": "npm run tests --project browser",
"test:integration": "npm run tests --project integration",
"test:unit": "npm run tests --project unit",
"geode_objects": "node scripts/generate_geode_objects.js && prettier ./assets/geode_objects.js --write",
"build": ""
},
"devDependencies": {
"@nuxt/test-utils": "3.21.0",
"@pinia/testing": "1.0.3",
"@vitejs/plugin-vue": "5.2.4",
"@vitest/browser-playwright": "4.0.16",
"@vitest/browser-preview": "4.0.16",
"@vue/test-utils": "2.4.6",
"electron": "36.4.0",
"eslint": "9.26.0",
Expand All @@ -30,7 +33,8 @@
"unplugin-auto-import": "20.0.0",
"vite": "6.3.5",
"vite-plugin-vuetify": "2.1.1",
"vitest": "4.0.15",
"vitest": "4.0.16",
"vitest-browser-vue": "2.0.1",
"vitest-environment-nuxt": "1.0.1"
},
"overrides": {
Expand Down
14 changes: 14 additions & 0 deletions tests/browser/Viewer/Options/ColorPicke.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { expect, test } from "vitest"
import { render } from "vitest-browser-vue"

import ColorPicker from "@/components/Viewer/Options/ColorPicker"
import { vuetify } from "../../../utils"

test("Graphic test for ColorPicker", async () => {
const component = await render(ColorPicker, {
global: {
plugins: [vuetify],
},
})
await expect(component.container).toMatchScreenshot()
})
14 changes: 14 additions & 0 deletions tests/browser/Viewer/Options/VisibilitySwitch.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { expect, test } from "vitest"
import { render } from "vitest-browser-vue"

import VisibilitySwitch from "@/components/Viewer/Options/VisibilitySwitch"
import { vuetify } from "../../../utils"

test("Graphic test for VisibilitySwitch", async () => {
const component = await render(VisibilitySwitch, {
global: {
plugins: [vuetify],
},
})
await expect(component.container).toMatchScreenshot("VisibilitySwitch")
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion tests/integration/microservices/back/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
# pip-compile --output-file=tests/integration/microservices/back/requirements.txt tests/integration/microservices/back/requirements.in
#

opengeodeweb-back==5.*,>=5.14.3rc1
1 change: 0 additions & 1 deletion tests/integration/microservices/viewer/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
# pip-compile --output-file=tests/integration/microservices/viewer/requirements.txt tests/integration/microservices/viewer/requirements.in
#

opengeodeweb-viewer==1.*,>=1.13.2
14 changes: 3 additions & 11 deletions tests/unit/components/CrsSelector.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"

import { mountSuspended } from "@nuxt/test-utils/runtime"
import { describe, expect, test, vi } from "vitest"
import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"
import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"

import CrsSelector from "@ogw_front/components/CrsSelector"
import { useGeodeStore } from "@ogw_front/stores/geode"

import { vuetify } from "../../utils"

Check warning on line 10 in tests/unit/components/CrsSelector.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(max-dependencies)

File has too many dependencies (11). Maximum allowed is 10.

const crs_selector_schema =

Check warning on line 12 in tests/unit/components/CrsSelector.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-unused-vars)

Variable 'crs_selector_schema' is declared but never used. Unused variables should start with a '_'.
schemas.opengeodeweb_back.geographic_coordinate_systems

const vuetify = createVuetify({
components,
directives,
})

describe("CrsSelector", () => {
const pinia = createTestingPinia({
stubActions: false,
Expand Down
15 changes: 3 additions & 12 deletions tests/unit/components/ExtensionSelector.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,76 +1,67 @@
import { describe, expect, test, vi } from "vitest"
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"
import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"
import * as components from "vuetify/components"

import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import ExtensionSelector from "@ogw_front/components/ExtensionSelector"

Check warning on line 8 in tests/unit/components/ExtensionSelector.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(max-dependencies)

File has too many dependencies (13). Maximum allowed is 10.

import { useGeodeStore } from "@ogw_front/stores/geode"

import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import { vuetify } from "../../utils"

const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions

const vuetify = createVuetify({
components,
directives,
})

describe("ExtensionSelector", async () => {
const pinia = createTestingPinia({
stubActions: false,
createSpy: vi.fn,
})
setActivePinia(pinia)
const geodeStore = useGeodeStore()
geodeStore.base_url = ""

// Mock the request method to simulate API call
geodeStore.request = vi.fn((schema, params, callbacks) => {
const response = {
_data: {
geode_objects_and_output_extensions: {
BRep: { msh: { is_saveable: true } },
},
},
}
if (callbacks?.response_function) {
callbacks.response_function(response)
}
return Promise.resolve(response)
})

test(`Select geode_object & extension`, async () => {
const output_geode_object = "BRep"
const output_extension = "msh"

registerEndpoint(schema.$id, {
method: schema.methods[0],
handler: () => ({
geode_objects_and_output_extensions: {
BRep: { msh: { is_saveable: true } },
},
}),
})
const wrapper = await mountSuspended(ExtensionSelector, {
global: {
plugins: [vuetify, pinia],
},
props: { geode_object_type: "BRep", filenames: ["test.toto"] },
})
await nextTick()
expect(wrapper.exists()).toBe(true)
const v_card = await wrapper.findAllComponents(components.VCard)
await v_card[1].trigger("click")
expect(wrapper.emitted()).toHaveProperty("update_values")
expect(wrapper.emitted().update_values).toHaveLength(1)
expect(wrapper.emitted().update_values[0][0]).toStrictEqual({
output_geode_object,
output_extension,
})
})
})

Check warning on line 67 in tests/unit/components/ExtensionSelector.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(require-await)

Async function has no 'await' expression.

Check warning on line 67 in tests/unit/components/ExtensionSelector.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(max-lines-per-function)

The async function has too many lines (54). Maximum allowed is 50.
9 changes: 1 addition & 8 deletions tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import { describe, expect, test, vi } from "vitest"
import { mount } from "@vue/test-utils"
import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"
import { createTestingPinia } from "@pinia/testing"
import { setActivePinia } from "pinia"

import FeedBackErrorBanner from "@ogw_front/components/FeedBack/ErrorBanner"
import { useFeedbackStore } from "@ogw_front/stores/feedback"

const vuetify = createVuetify({
components,
directives,
})
import { vuetify } from "../../../utils"

describe("FeedBackErrorBanner", async () => {
;(test(`Test reload`, async () => {
Expand Down
9 changes: 1 addition & 8 deletions tests/unit/components/FeedBack/Snackers.nuxt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@
vi.stubGlobal("visualViewport", new EventTarget())
import { describe, expect, test, vi } from "vitest"
import { mount } from "@vue/test-utils"
import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

import FeedBackSnackers from "@ogw_front/components/FeedBack/Snackers"
import { useFeedbackStore } from "@ogw_front/stores/feedback"

const vuetify = createVuetify({
components,
directives,
})
import { vuetify } from "../../../utils"

describe("FeedBackSnackers", async () => {
test(`Test delete error`, async () => {
Expand Down
9 changes: 1 addition & 8 deletions tests/unit/components/FileSelector.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { describe, expect, test, vi } from "vitest"
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
import { flushPromises } from "@vue/test-utils"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"
Expand All @@ -14,15 +11,11 @@ import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import FileSelector from "@ogw_front/components/FileSelector"
import FileUploader from "@ogw_front/components/FileUploader"
import { useGeodeStore } from "@ogw_front/stores/geode"
import { vuetify } from "../../utils"

const allowed_files_schema = schemas.opengeodeweb_back.allowed_files
const upload_file_schema = schemas.opengeodeweb_back.upload_file

const vuetify = createVuetify({
components,
directives,
})

describe("FileSelector", async () => {
const pinia = createTestingPinia({
stubActions: false,
Expand Down
10 changes: 2 additions & 8 deletions tests/unit/components/FileUploader.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { describe, expect, test, vi } from "vitest"
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
import { flushPromises } from "@vue/test-utils"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"
import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

Expand All @@ -13,12 +10,9 @@ import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import FileUploader from "@ogw_front/components/FileUploader"
import { useGeodeStore } from "@ogw_front/stores/geode"

const upload_file_schema = schemas.opengeodeweb_back.upload_file
import { vuetify } from "../../utils"

const vuetify = createVuetify({
components,
directives,
})
const upload_file_schema = schemas.opengeodeweb_back.upload_file

describe("FileUploader", async () => {
const pinia = createTestingPinia({
Expand Down
12 changes: 3 additions & 9 deletions tests/unit/components/Inspector/InspectionButton.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { describe, expect, test, vi } from "vitest"
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
import { mountSuspended } from "@nuxt/test-utils/runtime"
import { flushPromises } from "@vue/test-utils"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"
import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import InspectorInspectionButton from "@ogw_front/components/Inspector/InspectionButton"
import { useGeodeStore } from "@ogw_front/stores/geode"
const schema = schemas.opengeodeweb_back.inspect_file
import { vuetify } from "../../../utils"

const vuetify = createVuetify({
components,
directives,
})
const schema = schemas.opengeodeweb_back.inspect_file

describe("Inspector/InspectionButton", async () => {
const pinia = createTestingPinia({
Expand Down
10 changes: 1 addition & 9 deletions tests/unit/components/Inspector/ResultPanel.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import { describe, expect, test } from "vitest"
import { mountSuspended } from "@nuxt/test-utils/runtime"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import InspectorResultPanel from "@ogw_front/components/Inspector/ResultPanel"

const vuetify = createVuetify({
components,
directives,
})
import { vuetify } from "../../../utils"

describe("Inspector/ResultPanel", async () => {
test(`Test with issues`, async () => {
Expand Down
11 changes: 1 addition & 10 deletions tests/unit/components/Launcher.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
import { describe, expect, test, vi } from "vitest"
import { flushPromises } from "@vue/test-utils"
import { mountSuspended } from "@nuxt/test-utils/runtime"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

import Launcher from "@ogw_front/components/Launcher"

import { useInfraStore } from "@ogw_front/stores/infra"

const vuetify = createVuetify({
components,
directives,
})
import { vuetify } from "../../utils"

// Mock navigator.locks API
const mockLockRequest = vi.fn().mockImplementation(async (name, callback) => {
Expand Down
10 changes: 2 additions & 8 deletions tests/unit/components/MissingFilesSelector.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { describe, expect, test, vi } from "vitest"
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
import { flushPromises } from "@vue/test-utils"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"
import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

Expand All @@ -14,14 +11,11 @@ import MissingFilesSelector from "@ogw_front/components/MissingFilesSelector"
import FileUploader from "@ogw_front/components/FileUploader"
import { useGeodeStore } from "@ogw_front/stores/geode"

import { vuetify } from "../../utils"

const missing_files_schema = schemas.opengeodeweb_back.missing_files
const upload_file_schema = schemas.opengeodeweb_back.upload_file

const vuetify = createVuetify({
components,
directives,
})

describe("MissingFilesSelector", async () => {
const pinia = createTestingPinia({
stubActions: false,
Expand Down
13 changes: 2 additions & 11 deletions tests/unit/components/ObjectSelector.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import { describe, expect, test, vi } from "vitest"
import { registerEndpoint, mountSuspended } from "@nuxt/test-utils/runtime"
import { flushPromises } from "@vue/test-utils"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"
import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import ObjectSelector from "@ogw_front/components/ObjectSelector"

import { useGeodeStore } from "@ogw_front/stores/geode"

import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
import { vuetify } from "../../utils"

const allowed_objects = schemas.opengeodeweb_back.allowed_objects

const vuetify = createVuetify({
components,
directives,
})

describe("ObjectSelector", async () => {
const pinia = createTestingPinia({
stubActions: false,
Expand Down
11 changes: 1 addition & 10 deletions tests/unit/components/PackagesVersions.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import { describe, expect, test, vi } from "vitest"
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import { setActivePinia } from "pinia"
import { createTestingPinia } from "@pinia/testing"

import PackagesVersions from "@ogw_front/components/PackagesVersions"
import { useGeodeStore } from "@ogw_front/stores/geode"

const vuetify = createVuetify({
components,
directives,
})
import { vuetify } from "../../utils"

describe("PackagesVersions", async () => {
test(`Mount`, async () => {
Expand Down
10 changes: 1 addition & 9 deletions tests/unit/components/Step.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
import { describe, expect, test } from "vitest"
import { mount } from "@vue/test-utils"

import { createVuetify } from "vuetify"
import * as components from "vuetify/components"
import * as directives from "vuetify/directives"

import Step from "@ogw_front/components/Step"
import ObjectSelector from "@ogw_front/components/ObjectSelector"

const vuetify = createVuetify({
components,
directives,
})
import { vuetify } from "../../utils"

global.ResizeObserver = require("resize-observer-polyfill")

Check failure on line 8 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(no-commonjs)

Expected import instead of require

Check failure on line 8 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-unicorn(prefer-global-this)

Prefer `globalThis` over environment-specific global aliases like `window`, `self`, and `global`.

describe("Step", async () => {
test(`BRep`, async () => {
const geode_object_type = ref("BRep")
const files = ref([])
const stepper_tree = reactive({
current_step_index: ref(0),

Check failure on line 15 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-magic-numbers)

0
geode_object_type,
steps: [
{
Expand All @@ -36,7 +28,7 @@
},
chips: computed(() => {
if (geode_object_type.value === "") {
return []

Check warning on line 31 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-else-return)

Unnecessary `else` after `return`.
} else {
return [geode_object_type.value]
}
Expand All @@ -51,6 +43,6 @@
},
props: { step_index: 0 },
})
expect(wrapper.exists()).toBe(true)

Check failure on line 46 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-vitest(prefer-to-be-truthy)

Use `toBeTruthy` instead.
})

Check warning on line 47 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(require-await)

Async function has no 'await' expression.
})

Check warning on line 48 in tests/unit/components/Step.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(require-await)

Async function has no 'await' expression.
Loading
Loading