summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-04-10 13:57:55 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-04-10 13:57:55 +0000
commit9c576cc7e9414e64b4aac0544615e7d5e92c3558 (patch)
tree18acbfda089391720996f5f23868b9e25e11f310
parent481f07e77c11e24b6e99c2a23639041061e78c23 (diff)
parentfede01fb5ef488c387efe307c2453bd5aa34c073 (diff)
downloadgitlab-ce-9c576cc7e9414e64b4aac0544615e7d5e92c3558.tar.gz
Merge branch 'ci-favicon-back-in' into 'master'
Added back in the CI status favicon See merge request !10534
-rw-r--r--app/assets/javascripts/build.js2
-rw-r--r--spec/javascripts/build_spec.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js
index 9e7df9ad350..0aad95c2fe3 100644
--- a/app/assets/javascripts/build.js
+++ b/app/assets/javascripts/build.js
@@ -90,6 +90,8 @@ window.Build = (function () {
success: ((log) => {
const $buildContainer = $('.js-build-output');
+ gl.utils.setCiStatusFavicon(`${this.pageUrl}/status.json`);
+
if (log.state) {
this.state = log.state;
}
diff --git a/spec/javascripts/build_spec.js b/spec/javascripts/build_spec.js
index edd4b3c1440..7174bf1e041 100644
--- a/spec/javascripts/build_spec.js
+++ b/spec/javascripts/build_spec.js
@@ -98,9 +98,9 @@ describe('Build', () => {
jasmine.clock().tick(4001);
- expect($.ajax.calls.count()).toBe(2);
+ expect($.ajax.calls.count()).toBe(3);
- args = $.ajax.calls.argsFor(1)[0];
+ args = $.ajax.calls.argsFor(2)[0];
expect(args.url).toBe(`${BUILD_URL}/trace.json`);
expect(args.dataType).toBe('json');
expect(args.data.state).toBe('newstate');
@@ -133,7 +133,7 @@ describe('Build', () => {
expect($('#build-trace .js-build-output').text()).toMatch(/Update/);
jasmine.clock().tick(4001);
- args = $.ajax.calls.argsFor(1)[0];
+ args = $.ajax.calls.argsFor(2)[0];
args.success.call($, {
html: '<span>Different</span>',
status: 'running',