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.
ci / server (push) Failing after 3m48s
ci / client (push) Successful in 42s

This commit is contained in:
Leonid Pershin
2026-08-20 02:57:13 +03:00
parent cf086600c3
commit ed80aa5d08
4 changed files with 119 additions and 22 deletions
@@ -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 }),
),
);
});
});