Chromium Code Reviews| 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> |