module TK.SpaceTac.UI.Specs { testing("BattleInfoBar", test => { let testgame = setupEmptyView(test); test.case("shows turn counter and current phase", check => { const parent = testgame.view.getLayer("test"); const bar = new BattleInfoBar(parent.getBuilder(), { startResolution: () => null }); expect(collectTexts(parent)).toEqual(["Battle"]); bar.setPhase(3, BattleInfoBarPhase.PLANNING); expect(collectTexts(parent)).toEqual(["Planning phase", "Ready", "Turn 3"]); }); }); }