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

Side by Side Diff: go/src/infra/appengine/sheriff-o-matic/test/som-bug-queue-test.html

Issue 2053893002: [som] Add bug queue UI. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: refresh Created 4 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 unified diff | Download patch
« no previous file with comments | « go/src/infra/appengine/sheriff-o-matic/test/index.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <script src="/bower_components/webcomponentsjs/webcomponents.min.js"></script>
4 <script src="/bower_components/web-component-tester/browser.js"></script>
5 <link rel="import" href="/bower_components/iron-test-helpers/iron-test-helpers.h tml">
6 <link rel="import" href="/elements/som-bug-queue.html">
7 <test-fixture id="basic">
8 <template>
9 <som-bug-queue></som-bug-queue>
10 </template>
11 </test-fixture>
12 <script>
13 (function() {
14 'use strict';
15
16 suite('basic tests', function() {
17 var element;
18 var server;
19 var responseHeaders = {
20 json: {'Content-Type': 'application/json'},
21 };
22
23 setup(function() {
24 element = fixture('basic');
25 server = sinon.fakeServer.create();
26 });
27
28 teardown(function() {
29 server.restore();
30 });
31
32 test('_haveNoBugs', function() {
33 assert.equal(true, element._haveNoBugs());
34 assert.equal(true, element._haveNoBugs({}));
35 assert.equal(true, element._haveNoBugs({items:[]}));
36 assert.equal(false,
37 element._haveNoBugs({items:[{id:1, status: 'foo'}]}));
38 });
39
40 test('renders empty', function(done) {
41 assert.equal(true, element.$.main.hidden);
42 element._bugQueueJson = {};
43 assert.equal(true, element._haveNoBugs(element._bugQueueJson));
44 flush( () => {
45 assert.equal(true, element.$.main.hidden);
46 done();
47 });
48 });
49
50 test('renders basic', function(done) {
51 assert.equal(true, element.$.main.hidden);
52 element._bugQueueJson = {
53 items: [
54 { summary: "foo", status: "bar", id: 123 },
55 { summary: "baz", status: "zippy", id: 456 },
56 ],
57 };
58
59 assert.equal(false, element._haveNoBugs(element._bugQueueJson));
60
61 flush( () => {
62 assert.equal(false, element.$.main.hidden);
63 assert.equal(2, element.$.main.querySelectorAll('.bug').length);
64 done();
65 });
66 });
67 });
68 })();
69 </script>
OLDNEW
« no previous file with comments | « go/src/infra/appengine/sheriff-o-matic/test/index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698