feat: simplify angular host/player mvp controls
CI / test-and-quality (push) Successful in 2m27s
CI / test-and-quality (pull_request) Successful in 2m31s

This commit is contained in:
2026-03-13 08:24:14 +00:00
parent 9594a8fcb0
commit 58874c0d78
5 changed files with 144 additions and 30 deletions
@@ -262,5 +262,26 @@ describe('HostShellComponent gameplay wiring', () => {
await component.refreshSession();
expect(replaceState).toHaveBeenCalledWith(null, '', '#/host/guess/ABCD12');
expect(component.canStartRound).toBe(false);
expect(component.canShowQuestion).toBe(false);
expect(component.canMixAnswers).toBe(false);
expect(component.canCalculateScores).toBe(true);
});
it('uses phase_view_model to keep host action surface phase-specific', async () => {
const component = new HostShellComponent();
expect(component.canStartRound).toBe(true);
expect(component.canShowQuestion).toBe(false);
component.session = sessionDetailPayload('lie') as any;
expect(component.canStartRound).toBe(false);
expect(component.canShowQuestion).toBe(true);
expect(component.canMixAnswers).toBe(true);
component.session = sessionDetailPayload('reveal') as any;
expect(component.canRevealScoreboard).toBe(true);
expect(component.canStartNextRound).toBe(false);
expect(component.canFinishGame).toBe(false);
});
});