Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"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": ""
},
Expand Down Expand Up @@ -63,6 +64,8 @@
"@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",
"eslint": "9.26.0",
"eslint-plugin-import": "2.31.0",
Expand All @@ -79,9 +82,10 @@
"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",
"vitest-indexeddb": "^0.0.1"
"vitest-indexeddb": "0.0.1"
},
"peerDependencies": {
"electron": "36.4.0"
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"

Check failure on line 1 in tests/browser/Viewer/Options/ColorPicke.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-unicorn(filename-case)

Filename should be in snake_case
import { render } from "vitest-browser-vue"

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

Check failure on line 5 in tests/browser/Viewer/Options/ColorPicke.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(no-relative-parent-imports)

Relative imports from parent directories are not allowed

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"

Check failure on line 1 in tests/browser/Viewer/Options/VisibilitySwitch.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-unicorn(filename-case)

Filename should be in snake_case
import { render } from "vitest-browser-vue"

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

Check failure on line 5 in tests/browser/Viewer/Options/VisibilitySwitch.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(no-relative-parent-imports)

Relative imports from parent directories are not allowed

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==6.*,>=6.3.3
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.15.6
1 change: 1 addition & 0 deletions tests/unit/components/FileSelector.nuxt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"

// Local imports
import { setupActivePinia, vuetify } from "@ogw_tests/utils"

Check failure on line 9 in tests/unit/components/FileSelector.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

oxlint

Identifier `vuetify` has already been declared
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 EXPECTED_LENGTH = 1
const FIRST_INDEX = 0
Expand Down
1 change: 0 additions & 1 deletion tests/unit/components/Step.nuxt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import { describe, expect, test } from "vitest"
import ResizeObserver from "resize-observer-polyfill"
import { mount } from "@vue/test-utils"

import ObjectSelector from "@ogw_front/components/ObjectSelector"

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

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(sort-imports)

Imports should be sorted alphabetically.
import Step from "@ogw_front/components/Step"

import { vuetify } from "@ogw_tests/utils"
Expand All @@ -11,25 +10,25 @@
globalThis.ResizeObserver = ResizeObserver

describe(Step, () => {
test(`BRep`, async () => {
const geode_object_type = ref("BRep")
const files = ref([])
const stepper_tree = reactive({
current_step_index: ref(0),
geode_object_type,
steps: [
{
step_title: "Confirm the data type",
component: {
component_name: shallowRef(ObjectSelector),
component_options: {
filenames: computed(() => files.value.map((file) => file.name)),
key: "",
},
},
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 Down
22 changes: 20 additions & 2 deletions tests/vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { defineConfig } from "vitest/config"
import { defineVitestProject } from "@nuxt/test-utils/config"
import { fileURLToPath } from "node:url"
import path from "node:path"

import { defineConfig } from "vitest/config"
import { defineVitestProject } from "@nuxt/test-utils/config"
import { playwright } from "@vitest/browser-playwright"
// import vue from "@vitejs/plugin-vue"

Check failure on line 7 in tests/vitest.config.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(capitalized-comments)

Comments should not begin with a lowercase letter

const __dirname = path.dirname(fileURLToPath(import.meta.url))

const RETRIES = 3
Expand All @@ -21,6 +24,21 @@
globals: false,
setupFiles: [path.resolve(__dirname, "./setup_indexeddb.js")],
projects: [
await defineVitestProject({
// plugins: [vue()],

Check failure on line 28 in tests/vitest.config.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(capitalized-comments)

Comments should not begin with a lowercase letter
test: {
name: "browser",
include: ["tests/browser/**/*.test.js"],
setupFiles: ["vitest-browser-vue"],
browser: {
enabled: true,
// headless: true,

Check failure on line 35 in tests/vitest.config.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(capitalized-comments)

Comments should not begin with a lowercase letter
provider: playwright(),
instances: [{ browser: "chromium" }],
},
retry: globalRetry,
},
}),
await defineVitestProject({
test: {
name: "unit",
Expand Down
Loading