Merge branch 'review/slice-3-recheck'
This commit is contained in:
@@ -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(() =>
|
||||
|
||||
Reference in New Issue
Block a user