Add mocks for department daily report components and update Vitest configuration for SCSS

This commit is contained in:
Jeppe Bundgaard
2026-06-02 17:54:37 +02:00
parent b40bf0b9e1
commit 42dfdfef13
2 changed files with 71 additions and 0 deletions
@@ -64,6 +64,22 @@ vi.mock("@/components/pagination/departmentTabs.vue", async () => {
};
});
vi.mock("@/components/page/wrappers/RestrictedPageWrapper.vue", () => ({
default: { template: "<div><slot /></div>" },
}));
vi.mock("@/components/page/wrappers/NotFoundFallBackPageWrapper.vue", () => ({
default: { template: "<div><slot /></div>" },
}));
vi.mock("@/components/displays/boxes/ElementTabsBox.vue", () => ({
default: { template: "<div><slot name='form' /><slot name='history' /></div>" },
}));
vi.mock("@/views/dashboards/departmentDashboard/DepartmentDashboardPageWrapper.vue", () => ({
default: { template: "<div><slot /></div>" },
}));
vi.mock("@/views/dashboards/departmentDashboard/modules/daily-report/DepartmentDailyReportObject.vue", async () => {
const { ref } = await import("vue");
@@ -104,6 +120,52 @@ vi.mock("@/views/dashboards/departmentDashboard/modules/daily-report/DepartmentD
};
});
vi.mock("@/views/dashboards/departmentDashboard/modules/daily-report/DepartmentWeather.vue", () => ({
default: { template: "<div />" },
}));
vi.mock(
"@/views/dashboards/departmentDashboard/modules/daily-report/displays/DepartmentDashboardDailyReportCount.vue",
() => ({
default: { template: "<div />" },
})
);
vi.mock(
"@/views/dashboards/departmentDashboard/modules/daily-report/displays/DepartmentDashboardDailyReportComplaints.vue",
() => ({
default: { template: "<div />" },
})
);
vi.mock(
"@/views/dashboards/departmentDashboard/modules/daily-report/displays/DepartmentDashboardDailyReportHistory.vue",
() => ({
default: { template: "<div />" },
})
);
vi.mock(
"@/views/dashboards/departmentDashboard/modules/daily-report/displays/DepartmentDashboardDailyReportNavigation.vue",
() => ({
default: { template: "<div />" },
})
);
vi.mock(
"@/views/dashboards/departmentDashboard/modules/daily-report/displays/DepartmentDashboardDailyReportProductSales.vue",
() => ({
default: { template: "<div />" },
})
);
vi.mock(
"@/views/dashboards/departmentDashboard/modules/daily-report/displays/DepartmentDashboardDailyReportTodayForm.vue",
() => ({
default: { template: "<div />" },
})
);
import DepartmentDailyReport from "@/views/dashboards/departmentDashboard/modules/daily-report/DepartmentDailyReport.vue";
const flushAll = async () => {
+9
View File
@@ -10,6 +10,15 @@ export default defineConfig({
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
quietDeps: true,
silenceDeprecations: ["import", "global-builtin", "legacy-js-api", "if-function"],
},
},
},
test: {
environment: "node",
include: ["tests/unit/**/*.spec.js"],