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

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

Issue 2959833002: config_service: add last import validation and tests (Closed)
Patch Set: Add tests to front-page and config-set page. Created 3 years, 6 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
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 11f3ab7ded566f14f8445624732f30e0eb080674..958021baf85730ec057d313fcc7bf72d9014106c 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
@@ -27,12 +27,35 @@
<script>
suite('<front-page>', function() {
- // TODO(cwpayton): write tests for the front page element.
var front_page;
setup(function() {
front_page = fixture('front-pageTestFixture');
});
+ test('checks the config set list is empty before iron ajax call',
Sergey Berezin 2017/06/28 19:11:35 nit: same as above - consider naming the suite & t
ayanaadylova 2017/07/06 22:51:43 Done.
+ function() {
+ assert.equal(front_page.configSetList.length, 0);
+ });
+
+ test('checks the search results list is empty before iron ajax call',
+ function() {
+ assert.equal(front_page.searchResults.length, 0);
+ });
+
+ test('checks that isLoading property is true by default', function() {
+ assert.equal(front_page.isLoading, true);
+ });
+
+ test('gets iron-ajax response', function () {
+ var ajax = front_page.shadowRoot.querySelector('iron-ajax');
+ ajax.generateRequest();
+ ajax.addEventListener('response', function() {
+ assert.equal(front_page.isLoading, false);
+ assert.deepEqual(front_page.configSetList,
+ front_page.searchResults);
Sergey Berezin 2017/06/28 19:11:35 How is configSetList generated in this test? For
ayanaadylova 2017/07/06 22:51:43 Done.
+ });
+ });
+
});
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698