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

Unified Diff: go/src/infra/appengine/sheriff-o-matic/test/som-app-test.html

Issue 2200943002: SoM: Alerts error handling. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Made some columns shorter. Created 4 years, 4 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 | « go/src/infra/appengine/sheriff-o-matic/elements/som-app.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/appengine/sheriff-o-matic/test/som-app-test.html
diff --git a/go/src/infra/appengine/sheriff-o-matic/test/som-app-test.html b/go/src/infra/appengine/sheriff-o-matic/test/som-app-test.html
index 4689c656ab7050760324fbbca829b009c8791d99..c93a57168abf61af53f2826d2c2442dad4b1a2a6 100644
--- a/go/src/infra/appengine/sheriff-o-matic/test/som-app-test.html
+++ b/go/src/infra/appengine/sheriff-o-matic/test/som-app-test.html
@@ -16,6 +16,7 @@
var server;
var responseHeaders = {
json: {'Content-Type': 'application/json'},
+ text: {'Content-Type': 'text/html'},
};
setup(function() {
@@ -55,6 +56,31 @@
assert.equal(
element.$$('.last-updated').textContent.trim(),
'Last updated: Unknown');
+
+ expect(element.$.fetchAlertsError).be.hidden;
+ });
+
+ test('tree not found', function(done) {
+ let tree = 'notfound';
+ let groups = [tree];
+
+ element._alertsGroupsChanged(groups);
+
+ server.respondWith(
+ 'GET',
+ '/api/v1/alerts/' + tree, [
+ 404,
+ responseHeaders.text,
+ 'Tree not found'
+ ]
+ );
+ server.respond();
+
+ flush(function() {
+ assert.notEqual(element._fetchAlertsError, '');
+ expect(element.$.fetchAlertsError).be.visible;
+ done();
+ });
});
});
« no previous file with comments | « go/src/infra/appengine/sheriff-o-matic/elements/som-app.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698