18 lines
807 B
JavaScript
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>/);
|
||
|
|
});
|