Files
pleno-vue/tests/unit/department-modules-setup-self-serve.spec.js
T
Jeppe Bundgaard b39b458f4f Add .prettierrc.json and refactor test files for improved formatting consistency:
- Introduced `.prettierrc.json` to enforce consistent code formatting across the project.
- Updated unit and e2e test files to address formatting issues, improve readability, and ensure alignment with the new Prettier configuration.
2026-04-13 09:13:27 +02:00

24 lines
937 B
JavaScript

import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
const source = readFileSync(
join(process.cwd(), "src/views/dashboards/superUserDashboard/department/modules/DepartmentModulesSetup.vue"),
"utf8"
);
describe("DepartmentModulesSetup self-serve management regression", () => {
it("loads and updates department self-serve status through shared helpers", () => {
expect(source).toContain("getDepartmentSelfServeEnabled");
expect(source).toContain("setDepartmentSelfServeEnabled");
expect(source).toContain("loadSelfServeEnabled()");
expect(source).toContain("updateSelfServeEnabled");
});
it("renders a dedicated self-serve module switch in setup UI", () => {
expect(source).toContain('subtitle="Selvvask"');
expect(source).toContain('title="Selvvask"');
expect(source).toContain("Aktiver selvvask i denne afdeling.");
});
});