bmc_hub/tests/js/planning-navigation.test.cjs
Christian 1fb5b4a191 Add comprehensive tests for email and drift functionalities
- Introduced tests for drift operations UI and backend to ensure proper handling of ignore rules and UI elements.
- Added tests for email identity API to validate email linking and identity retrieval without updates.
- Implemented tests for email purchase link service to verify correct handling of purchase mail links and conflict scenarios.
- Created tests for email reply automation to ensure proper routing and processing of replies based on classification.
- Developed tests for email sender creation to validate suggestions and handling of existing contacts and companies.
- Added tests for email sender identity to ensure correct matching of contacts and domains.
- Implemented tests for work desk functionalities to validate task management, meeting registrations, and timer functionalities.
2026-11-03 01:16:12 +01:00

18 lines
807 B
JavaScript

const {test} = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const desk = fs.readFileSync('app/modules/planner/templates/desk.html', 'utf8');
const work = fs.readFileSync('app/modules/planner/templates/work.html', 'utf8');
test('planning has one clear route for work, task distribution, and capacity', () => {
for (const template of [desk, work]) {
assert.match(template, /href="\/planning\?view=queue"/);
assert.match(template, />\s*Opgaver\s*<span>Fordel og planlæg<\/span>/);
assert.match(template, />\s*Team og kapacitet\s*<span>Se belastning og ledig tid<\/span>/);
}
assert.match(desk, /aria-current="page"/);
assert.match(desk, /Fuld kalender/);
assert.doesNotMatch(desk, /Fordel opgaver<\/a>/);
});