Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ venv
.pytest_cache
__snapshots__
coverage
.nuxtrc
*.db
package-lock.json
/build
Expand Down
44 changes: 37 additions & 7 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,40 @@
import package_json from "./package.json";

const __dirname = import.meta.dirname;
console.log(`Loading Nuxt config: ${import.meta.url}`);

Check warning on line 8 in nuxt.config.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.

const sharedAlias = {
"@ogw_front": path.resolve(__dirname, "app"),
"@ogw_internal": path.resolve(__dirname, "internal"),
"@ogw_server": path.resolve(__dirname, "server"),
"@ogw_tests": path.resolve(__dirname, "tests"),
};
const oneMinute = 60_000;

export default defineNuxtConfig({
runtimeConfig: {
public: {
COMMAND_BACK: "opengeodeweb-back",
COMMAND_VIEWER: "opengeodeweb-viewer",
DATA_FOLDER_PATH: path.join("tests", "integration", "data", "uploads"),
NUXT_ROOT_PATH: __dirname,
MODE: process.env.MODE || "CLOUD",
PROJECT: package_json.name,
},
},

modules: [["@pinia/nuxt", { autoImports: ["defineStore", "storeToRefs"] }], "@vueuse/nuxt"],
modules: [
["@pinia/nuxt", { autoImports: ["defineStore", "storeToRefs"] }],
"@vueuse/nuxt",
"vuetify-nuxt-module",
],
imports: {
scan: false,
},

alias: {
"@ogw_front": path.resolve(__dirname, "app"),
"@ogw_internal": path.resolve(__dirname, "internal"),
"@ogw_server": path.resolve(__dirname, "server"),
"@ogw_tests": path.resolve(__dirname, "tests"),
},
ssr: false,

alias: sharedAlias,

// ** Global CSS
css: ["vuetify/lib/styles/main.sass"],
Expand Down Expand Up @@ -61,16 +71,36 @@
},

vite: {
alias: sharedAlias,
build: {
sourcemap: process.env.NODE_ENV === "test",
},
optimizeDeps: {
include: [
"ajv",
"dexie",
"fast-deep-equal",
"globalthis",
"h3",
"get-port-please",
"js-file-download",
"lodash",
"lodash/merge",
"realistic-structured-clone",
"seedrandom",
"spark-md5",
"util",
"ws",
"xmlbuilder2",
],
},
server: {
fs: {
allow: [
path.resolve(__dirname, "../../node_modules/@fontsource"),
path.resolve(__dirname, "../../node_modules/@mdi/font"),
],
},
},
},
});
23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"build:microservices": "concurrently \"npm run build:back\" \"npm run build:viewer\"",
"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:e2e": "npm run tests --project e2e",
"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 @@ -69,20 +71,25 @@
"wslink": "1.12.4"
},
"devDependencies": {
"@nuxt/test-utils": "3.21.0",
"@nuxt/test-utils": "4.0.2",
"@pinia/testing": "1.0.3",
"@vitejs/plugin-vue": "6.0.4",
"@vitest/browser": "4.1.4",
"@vitest/browser-playwright": "4.1.4",
"@vue/test-utils": "2.4.6",
"happy-dom": "20.0.11",
"cross-env": "10.0.0",
"happy-dom": "20.8.9",
"msw": "2.11.1",
"playwright-core": "1.52.0",
"playwright": "1.59.1",
"playwright-core": "1.59.1",
"resize-observer-polyfill": "1.5.1",
"unplugin-auto-import": "20.0.0",
"vite": "7.3.1",
"vite-plugin-vuetify": "2.1.1",
"vitest": "4.0.15",
"vitest-environment-nuxt": "1.0.1",
"vitest-indexeddb": "0.0.1"
"vite-plugin-node-polyfills": "0.26.0",
"vite-plugin-vuetify": "2.1.3",
"vitest": "4.1.4",
"vitest-browser-vue": "2.1.0",
"vitest-indexeddb": "0.0.2"
},
"overrides": {
"vue": "latest"
Expand Down
100 changes: 100 additions & 0 deletions tests/e2e/app/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<script setup>
import { Status } from "@ogw_front/utils/status";
import { useDataStore } from "@ogw_front/stores/data";
import { useInfraStore } from "@ogw_front/stores/infra";
import { useMenuStore } from "@ogw_front/stores/menu";

import HybridRenderingView from "@ogw_front/components/HybridRenderingView";
import ViewerUI from "@ogw_front/components/Viewer/Ui";

const menuStore = useMenuStore();
const infraStore = useInfraStore();
const dataStore = useDataStore();

const containerWidth = ref(0);
const containerHeight = ref(0);
const cardContainer = useTemplateRef("cardContainer");
const viewerUI = useTemplateRef("viewerUI");

const { display_menu } = storeToRefs(menuStore);

async function handleTreeMenu({ event, itemId, context_type, modelId }) {
const rect = cardContainer.value.getBoundingClientRect();
const x = event.clientX - rect.left;
const yUI = event.clientY - rect.top;

const meta_data =
context_type === "model_component"
? {
viewer_type: "model_component",
geode_object_type: "component",
modelId,
pickedComponentId: itemId,
}
: await dataStore.item(itemId);

menuStore.openMenu(
itemId,
x,
yUI,
containerWidth.value,
containerHeight.value,
rect.top,
rect.left,
meta_data,
);
}

async function openMenu(event) {
const rect = cardContainer.value.getBoundingClientRect();
const x = event.clientX - rect.left;
const yPicking = containerHeight.value - (event.clientY - rect.top);
const yUI = event.clientY - rect.top;

const { id: pickedId, viewer_id } = await viewerUI.value.get_viewer_id(x, yPicking);
if (!pickedId) {
return;
}
const item = await dataStore.item(pickedId);

if (item.viewer_type === "model" && viewer_id !== undefined) {
const component = await dataStore.getComponentByViewerId(pickedId, viewer_id);
if (component) {
item.pickedComponentId = component.geode_id;
}
}

menuStore.openMenu(
pickedId,
x,
yUI,
containerWidth.value,
containerHeight.value,
rect.top,
rect.left,
item,
);
}

const { width: elWidth, height: elHeight } = useElementSize(cardContainer);

watch([elWidth, elHeight], ([width, height]) => {
containerWidth.value = width;
containerHeight.value = height;
});

onMounted(() => {
infraStore.create_backend();
});
</script>

<template>
<div
v-if="infraStore.status === Status.CREATED"
ref="cardContainer"
style="width: 100%; height: 100vh"
@contextmenu.prevent="openMenu"
>
<HybridRenderingView />
</div>
</template>
12 changes: 12 additions & 0 deletions tests/e2e/app/plugins/microservices.client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { useGeodeStore } from "@ogw_front/stores/geode";
import { useInfraStore } from "@ogw_front/stores/infra";
import { useViewerStore } from "@ogw_front/stores/viewer";

export default defineNuxtPlugin(() => {

Check failure on line 5 in tests/e2e/app/plugins/microservices.client.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(no-default-export)

Prefer named exports
const geodeStore = useGeodeStore();
const infraStore = useInfraStore();
const viewerStore = useViewerStore();

infraStore.register_microservice(geodeStore);
infraStore.register_microservice(viewerStore);
});
46 changes: 46 additions & 0 deletions tests/e2e/cells.nuxt.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Node imports
import path from "node:path";

// Third party imports
import { beforeAll, describe, expect, test } from "vitest";
import { createPage, setup, url } from "@nuxt/test-utils/e2e";

import { setupIntegrationTests } from "@ogw_tests/integration/setup";

// Local imports

const timeout = 180_000; // increased

Check failure on line 12 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-inline-comments)

Unexpected comment inline with code

Check failure on line 12 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(capitalized-comments)

Comments should not begin with a lowercase letter
const INTERVAL_TIMEOUT = 180_000; // for beforeAll

Check failure on line 13 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-inline-comments)

Unexpected comment inline with code

Check failure on line 13 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(capitalized-comments)

Comments should not begin with a lowercase letter

await setup({
rootDir: path.resolve(import.meta.dirname),
server: true,
browser: true,
setupTimeout: 80_000,
});

const file_name = "test.og_rgd2d";
const geode_object = "RegularGrid2D";
let id = "",
projectFolderPath = "";

beforeAll(async () => {
id = "";
projectFolderPath = "";
await setupIntegrationTests(file_name, geode_object);
}, INTERVAL_TIMEOUT);

describe("Dashboard E2E – Real Nitro Backend + Playwright Browser", () => {
test(
"HybridRenderingView component renders",
async () => {
const page = await createPage(url("/"));
console.log("→ Page opened. Waiting for full load and rendering...");

Check warning on line 38 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.
await page.waitForLoadState("networkidle", { timeout: 90_000 });
page.waitForTimeout(5000);

Check failure on line 40 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-magic-numbers)

No magic number: 5000
console.log("→ Taking screenshot...");

Check warning on line 41 in tests/e2e/cells.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.
await expect(page).toMatchScreenshot("hybrid-rendering-view");
},
timeout,
);
});
23 changes: 23 additions & 0 deletions tests/e2e/global_setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { buildNuxt, loadNuxt } from "@nuxt/kit";
import path from "node:path";
import { setupActivePinia } from "@ogw_tests/utils";

let nuxt = undefined;

export default async function setup() {

Check failure on line 7 in tests/e2e/global_setup.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint-plugin-import(no-default-export)

Prefer named exports
console.log("FROM SETUP.JS - Current Directory:", import.meta.dirname);

Check warning on line 8 in tests/e2e/global_setup.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.
await setupActivePinia();
nuxt = await loadNuxt({
rootDir: path.resolve(import.meta.dirname),
server: true,
dev: true,
dotenv: { env: { MODE: "BROWSER" } },
});
console.log("FROM SETUP.JS - buildNuxt", import.meta.dirname);

Check warning on line 16 in tests/e2e/global_setup.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.
await buildNuxt(nuxt);

await nuxt.server?.listen();

process.env.NUXT_TEST_URL = `http://localhost:${nuxt.options.devServer.port}`;
console.log("✓ Nuxt ready at", process.env.NUXT_TEST_URL);

Check warning on line 22 in tests/e2e/global_setup.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.
}
24 changes: 24 additions & 0 deletions tests/e2e/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import path from "node:path";

const __dirname = import.meta.dirname;
console.log(`Loading Nuxt config: ${import.meta.url}`);

Check warning on line 4 in tests/e2e/nuxt.config.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-console)

Unexpected console statement.
const rootNuxtConfigPath = path.resolve(__dirname, "../..", "nuxt.config.js");
const workspaceNodeModules = path.resolve(__dirname, "../../../../node_modules");

export default defineNuxtConfig({
devtools: false,
extends: [rootNuxtConfigPath],
compatibilityDate: "2026-04-15",

modules: [["@pinia/nuxt", { autoImports: ["defineStore", "storeToRefs"] }], "@vueuse/nuxt"],
vite: {
define: {
name: "true",
},
server: {
fs: {
allow: [".", workspaceNodeModules],
},
},
},
});
8 changes: 8 additions & 0 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@geode/opengeodeweb-front/tests/e2e",
"version": "0.0.0",
"scripts": {
"build:browser": "cross-env MODE=BROWSER nuxi build",
"dev": "cross-env MODE=BROWSER nuxt dev"
}
}
8 changes: 8 additions & 0 deletions tests/e2e/test.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { createPage, setup } from "@nuxt/test-utils/e2e";
import { test } from "vitest";

await setup();

test("should run without error", async () => {
await createPage("/");
}, 5000);

Check failure on line 8 in tests/e2e/test.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(no-magic-numbers)

No magic number: 5000
7 changes: 0 additions & 7 deletions tests/integration/microservices/back/requirements.txt

This file was deleted.

7 changes: 0 additions & 7 deletions tests/integration/microservices/viewer/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions tests/integration/stores/viewer.nuxt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Local imports
import { Status } from "@ogw_front/utils/status";
import { cleanupBackend } from "@ogw_front/utils/local/cleanup";
import { runMicroservices } from "@ogw_tests/integration/setup";
// import { runMicroservices } from "@ogw_tests/integration/setup";

Check failure on line 10 in tests/integration/stores/viewer.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(capitalized-comments)

Comments should not begin with a lowercase letter
import { setupActivePinia } from "@ogw_tests/utils";
import { useViewerStore } from "@ogw_front/stores/viewer";

Expand All @@ -15,10 +15,10 @@

let projectFolderPath = "";

beforeAll(async () => {
setupActivePinia();
({ projectFolderPath } = await runMicroservices());
// ({ projectFolderPath } = await runMicroservices());
});

Check failure on line 21 in tests/integration/stores/viewer.nuxt.test.js

View workflow job for this annotation

GitHub Actions / test / oxlint

eslint(require-await)

Async function has no `await` expression.

afterAll(async () => {
await cleanupBackend(projectFolderPath);
Expand Down
Loading
Loading