1
0
Fork 0
spacetac/src/ui/battle/BattleInfoBar.spec.ts

17 lines
574 B
TypeScript
Raw Normal View History

2019-05-16 16:32:47 +00:00
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");
2019-05-16 17:33:40 +00:00
const bar = new BattleInfoBar(parent.getBuilder(), { startResolution: () => null });
2019-05-16 16:32:47 +00:00
expect(collectTexts(parent)).toEqual(["Battle"]);
bar.setPhase(3, BattleInfoBarPhase.PLANNING);
expect(collectTexts(parent)).toEqual(["Planning phase", "Ready", "Turn 3"]);
});
});
}