Skip to content

Commit

Permalink
[Frontend] Updated tests for glyph refactoring
Browse files Browse the repository at this point in the history
Fixes #1047
Fixing test cases: fixed test in Timers that was expecting
glyph return;
  • Loading branch information
charlesh88 committed Jul 22, 2016
1 parent ae59ecf commit 2231f8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions platform/features/clock/test/controllers/TimerControllerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ define(
'timer.restart': mockRestart
}[k]];
});
mockStart.getMetadata.andReturn({ glyph: "S", name: "Start" });
mockRestart.getMetadata.andReturn({ glyph: "R", name: "Restart" });
mockStart.getMetadata.andReturn({ cssclass: "icon-play", name: "Start" });
mockRestart.getMetadata.andReturn({ cssclass: "icon-refresh", name: "Restart" });
mockScope.domainObject = mockDomainObject;

testModel = {};
Expand Down Expand Up @@ -144,14 +144,14 @@ define(
expect(controller.text()).toEqual("0D 00:00:00");
});

it("shows glyph & name for the applicable start/restart action", function () {
it("shows cssclass & name for the applicable start/restart action", function () {
invokeWatch('domainObject', mockDomainObject);
expect(controller.buttonGlyph()).toEqual("S");
expect(controller.buttonCssClass()).toEqual("icon-play");
expect(controller.buttonText()).toEqual("Start");

testModel.timestamp = 12321;
invokeWatch('model.modified', 1);
expect(controller.buttonGlyph()).toEqual("R");
expect(controller.buttonCssClass()).toEqual("icon-refresh");
expect(controller.buttonText()).toEqual("Restart");
});

Expand Down

0 comments on commit 2231f8e

Please sign in to comment.