Record slice 3 staffing recheck after later-slice drift.

Pin owner Overview/Management tabs and applicant row fields; journal the recheck.
This commit is contained in:
Leonid Pershin
2026-08-21 12:38:35 +03:00
parent cbd8c998a2
commit 52ace87d69
4 changed files with 73 additions and 2 deletions
@@ -134,6 +134,27 @@ describe('GameScreen speed buttons', () => {
expect((manageTab as HTMLElement).hidden).toBe(true);
expect((screen.element.querySelector('.clock__controls') as HTMLElement).hidden).toBe(true);
});
it('shows Overview and Management mode tabs for the owner', () => {
const screen = new GameScreen({
onLeave: () => {},
onSetRunning: () => {},
onSetSpeed: () => {},
onSkip: () => {},
});
document.body.append(screen.element);
screen.show(school());
const tabs = [...screen.element.querySelectorAll<HTMLElement>('.mode-tab')];
expect(tabs).toHaveLength(2);
expect(tabs[0]?.textContent).toBe(t('modeOverview'));
expect(tabs[1]?.textContent).toBe(t('modeManage'));
expect(tabs[0]?.hidden).toBe(false);
expect(tabs[1]?.hidden).toBe(false);
expect(tabs[0]?.classList.contains('mode-tab--active')).toBe(true);
expect(screen.element.querySelector('.clockbar')).not.toBeNull();
});
});
describe('GameScreen location tree', () => {
@@ -110,7 +110,7 @@ function staffing(): Staffing {
isParent: true,
hourlyWageAsk: 12,
monthlyBase: 2_000,
skills: [],
skills: [{ id: 'Mathematics', label: 'Math', value: '78' }],
traits: [],
},
],
@@ -191,6 +191,10 @@ describe('ManagementPanel payroll cap', () => {
throw new Error('applicant row is missing');
}
expect(row.textContent).toContain('Sidorova Anna');
expect(row.textContent).toContain(formatMoney(12));
expect(row.textContent).toContain('Math');
row.click();
await vi.waitFor(() => expect(fetchPerson).toHaveBeenCalled());
await vi.waitFor(() =>