ui: add nodeShow test

This commit is contained in:
Jack Pearkes 2014-06-10 11:02:21 -04:00
parent 5f98fccf72
commit 48eaada3ae
1 changed files with 18 additions and 2 deletions

View File

@ -68,8 +68,9 @@ test("servicesShow", function() {
ok(find(".ember-list-item-view .list-group-item").hasClass('active'), "highlights active service");
ok(find(".ember-list-item-view .name:contains('"+ fixtures.service +"')"), "uses service name");
ok(find(".ember-list-item-view .name:contains('passing')"), "shows passing check num");
equal(find("h5").text(), "Nodes", "Shows node list");
ok(find("h3.panel-title:contains('"+ fixtures.node +"')"), "Shows node name");
ok(find("h3:contains('"+ fixtures.service+"')"), "shows service name");
equal(find("h5").text(), "Nodes", "shows node list");
ok(find("h3.panel-title:contains('"+ fixtures.node +"')"), "shows node name");
});
});
@ -85,6 +86,21 @@ test("nodes", function() {
});
});
test("nodesShow", function() {
visit("/");
click("a:contains('Nodes')");
// First item in list
click('.ember-list-item-view .list-group-item');
andThen(function() {
ok(find("a:contains('Nodes')").hasClass('active'), "highlights services in nav");
equal(find(".ember-list-item-view").length, 1, "renders one service");
ok(find(".ember-list-item-view .list-group-item").hasClass('active'), "highlights active node");
ok(find(".ember-list-item-view .name:contains('"+ fixtures.node +"')"), "uses node name");
ok(find(".ember-list-item-view .name:contains('passing')"), "shows passing check num");
});
});
test("kv", function() {
visit("/");
click("a:contains('Key/Value')");