Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7816)

Unified Diff: appengine/config_service/ui/test/config-ui/front-page_test.html

Issue 2977763002: config_service: Changed lists from paper-items to paper-cards, fixed (Closed)
Patch Set: Fixed nit regarding first letter of sentence in comment. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/config_service/ui/test/config-ui/config-set_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/config_service/ui/test/config-ui/front-page_test.html
diff --git a/appengine/config_service/ui/test/config-ui/front-page_test.html b/appengine/config_service/ui/test/config-ui/front-page_test.html
index 1657c177130451b0a3e4db5436c623a511a65612..66a8bf306e72444c9b23bbee0862378d2d6f8089 100644
--- a/appengine/config_service/ui/test/config-ui/front-page_test.html
+++ b/appengine/config_service/ui/test/config-ui/front-page_test.html
@@ -90,14 +90,18 @@
test('gets iron-ajax response', function () {
request = ajax.generateRequest();
server.respond();
- expect(request.response).to.be.ok;
+ expect(request.status).to.be.equal(200);
expect(request.response).to.be.an('object');
expect(request.response.event).to.be.an('object');
// TODO(crbug.com/740768): make the element call on-response handler automatically
front_page._onGotConfigSets(request.response.event);
assert.equal(front_page.isLoading, false);
assert.equal(front_page.configSetList.length, 2);
- assert.deepEqual(front_page.configSetList,
+ var sortedResults = front_page.configSetList.slice();
+ sortedResults.sort(function(a, b) {
+ return front_page._formatName(a.config_set).localeCompare(front_page._formatName(b.config_set));
+ }.bind(front_page));
+ assert.deepEqual(sortedResults,
front_page.searchResults);
assert.equal(front_page.configSetList[0].last_import_attempt.success,
true);
@@ -122,7 +126,11 @@
// TODO(crbug.com/740768): make the element call on-response handler automatically
front_page._onGotConfigSets(request.response.event);
front_page.query = "project";
- assert.deepEqual(front_page.configSetList,
+ var sortedResults = front_page.configSetList.slice();
+ sortedResults.sort(function(a, b) {
+ return front_page._formatName(a.config_set).localeCompare(front_page._formatName(b.config_set));
+ }.bind(front_page));
+ assert.deepEqual(sortedResults,
front_page.searchResults);
assert.equal(front_page.searchResults.length, 2);
});
@@ -132,14 +140,12 @@
server.respond();
// TODO(crbug.com/740768): make the element call on-response handler automatically
front_page._onGotConfigSets(request.response.event);
- front_page.query = "valid-project";
+ front_page.query = "invalid-project";
assert.notEqual(front_page.configSetList,
front_page.searchResults);
- assert.equal(front_page.searchResults[0].config_set, "valid-project");
+ assert.equal(front_page.searchResults[0].config_set, "invalid-project");
});
-
});
-
</script>
</body>
</html>
« no previous file with comments | « appengine/config_service/ui/test/config-ui/config-set_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698