Skip to content
Merged
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
1 change: 1 addition & 0 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def hook( # noqa: PLR0915 # yes, this is a lot of statements, but it's all just
context["node_kiota_bundle_version"] = "1.0.0-preview.100"
context["labsync_nuxt_common_version"] = "^0.1.0"
context["tanstack_vue_table_version"] = "^8.21.3"
context["unplugin_auto_import_version"] = "^21.0.0"

context["gha_checkout"] = "v6.0.2"
context["gha_setup_python"] = "v6.2.0"
Expand Down
3 changes: 2 additions & 1 deletion template/frontend/package.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"playwright-core": "{% endraw %}{{ playwright_version }}{% raw %}",
"postcss": "^8.5.14",
"tailwindcss": "{% endraw %}{{ tailwindcss_version }}{% raw %}",
"typescript": "{% endraw %}{{ typescript_version }}{% raw %}",
"typescript": "{% endraw %}{{ typescript_version }}{% raw %}",{% endraw %}{% if is_circuit_python_driver %}{% raw %}
"unplugin-auto-import": "{% endraw %}{{ unplugin_auto_import_version }}{% raw %}",{% endraw %}{% endif %}{% raw %}
"vitest": "{% endraw %}{{ vitest_version }}{% raw %}",
"vue-eslint-parser": "{% endraw %}{{ vue_eslint_parser_version }}{% raw %}",
"vue-tsc": "{% endraw %}{{ vue_tsc_version }}{% raw %}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { fileURLToPath } from "node:url";
{% raw %}import { fileURLToPath } from "node:url";

import { defineVitestProject } from "@nuxt/test-utils/config";
{% endraw %}{% if is_circuit_python_driver %}import AutoImport from "unplugin-auto-import/vite";
{% endif %}{% raw %}
import { defineConfig, type TestProjectInlineConfiguration } from "vitest/config";

const fakerSeed = Number(process.env.TEST_FAKER_SEED) || Math.floor(Math.random() * 1e9); // to use this, you'll need to create a setup.ts file and add it to the vitest `setupFiles` config
Expand Down Expand Up @@ -80,6 +82,21 @@ const e2eProject = {
"@": appDir,
},
},
{% endraw %}{% if is_circuit_python_driver %}{% raw %}
// Nuxt auto-imports (like `useKiotaClient`) are injected at build time by Nuxt's vite plugin
// chain, which is absent here. This plugin replicates that injection for the e2e test context
// so composables that rely on auto-imports (e.g. useBackendClient → useKiotaClient) resolve.
plugins: [
AutoImport({
imports: [
{
"@lab-sync/nuxt-common": ["useKiotaClient", "_resetKiotaClientForTests"],
},
],
dts: false, // type-checking runs separately via pre-commit; no .d.ts needed here
}),
],
{% endraw %}{% endif %}{% raw %}
test: {
name: "e2e",
include: ["tests/e2e/**/*.spec.ts"],
Expand Down Expand Up @@ -110,4 +127,4 @@ export default defineConfig({
exclude: ["**/generated/**"],
},
},
});
});{% endraw %}