- 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.
24 lines
937 B
JavaScript
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.");
|
|
});
|
|
});
|