Update AGENTS.md to correct the behavior of presence frames during school pauses, clarify the design documentation regarding mod load order, and add a new test for uncovered teaching positions in the management panel. Enhance reviewed phase details for accuracy and completeness.
This commit is contained in:
@@ -165,3 +165,42 @@ describe('ManagementPanel payroll cap', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('ManagementPanel uncovered', () => {
|
||||
beforeEach(() => {
|
||||
setLocale('en');
|
||||
vi.mocked(fetchStaffing).mockReset();
|
||||
vi.mocked(fetchTimetable).mockReset();
|
||||
vi.mocked(fetchStaffing).mockResolvedValue({
|
||||
...staffing(),
|
||||
applicants: [],
|
||||
uncovered: [
|
||||
{
|
||||
defName: 'PrimarySchool',
|
||||
label: 'Primary',
|
||||
gradeMin: 1,
|
||||
gradeMax: 4,
|
||||
hoursPerWeek: 80,
|
||||
teachersShort: 3,
|
||||
},
|
||||
],
|
||||
});
|
||||
vi.mocked(fetchTimetable).mockResolvedValue(timetable());
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
document.body.replaceChildren();
|
||||
setLocale(initialLocale);
|
||||
});
|
||||
|
||||
it('shows how many teachers a subject still needs', async () => {
|
||||
const panel = new ManagementPanel();
|
||||
document.body.append(panel.listElement, panel.cardElement);
|
||||
panel.show(2);
|
||||
await vi.waitFor(() =>
|
||||
expect(panel.listElement.textContent).toContain(
|
||||
t('staffUncoveredShort', { label: 'Primary', min: 1, max: 4, n: 3 }),
|
||||
),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user