From 67bd56e692504a3a9f61cb1c64940e4fc10473c3 Mon Sep 17 00:00:00 2001 From: Colin McLeod Date: Thu, 17 Sep 2015 22:09:30 -0700 Subject: [PATCH] Top speed display and test tweaks --- app/js/shipyard/module-shipyard.js | 4 ++-- test/tests/test-factory-ship.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/js/shipyard/module-shipyard.js b/app/js/shipyard/module-shipyard.js index b8763405..779c50ad 100755 --- a/app/js/shipyard/module-shipyard.js +++ b/app/js/shipyard/module-shipyard.js @@ -87,10 +87,10 @@ angular.module('shipyard', ['ngLodash']) }, { // 1 title: 'speed', - props: ['speed', 'boost'], + props: ['topSpeed', 'boost'], lbls: ['thrusters', 'boost'], unit: 'm/s', - fmt: 'fRound' + fmt: 'fCrd' }, { // 2 title: 'armour', diff --git a/test/tests/test-factory-ship.js b/test/tests/test-factory-ship.js index fa3200d3..45ac0124 100644 --- a/test/tests/test-factory-ship.js +++ b/test/tests/test-factory-ship.js @@ -21,7 +21,8 @@ describe("Ship Factory", function() { ship.buildWith(shipData.defaults); expect(ship.totalCost).toEqual(shipData.retailCost, s + ' retail cost does not match default build cost'); - expect(ship.priorityBands[0].retracted).toBeGreaterThan(0, s + ' cargo'); + expect(ship.cargoCapacity).toBeDefined(s + ' cargo'); + expect(ship.priorityBands[0].retracted).toBeGreaterThan(0, s + ' priorityBands'); expect(ship.powerAvailable).toBeGreaterThan(0, s + ' powerAvailable'); expect(ship.unladenRange).toBeGreaterThan(0, s + ' unladenRange'); expect(ship.ladenRange).toBeGreaterThan(0, s + ' ladenRange'); @@ -30,6 +31,7 @@ describe("Ship Factory", function() { expect(ship.ladenTotalRange).toBeGreaterThan(0, s + ' ladenTotalRange'); expect(ship.shieldStrength).toBeGreaterThan(0, s + ' shieldStrength'); expect(ship.armour).toBeGreaterThan(0, s + ' armour'); + expect(ship.topSpeed).toBeGreaterThan(0, s + ' topSpeed'); } });