diff options
author | Takuya Noguchi <tak.noguchi.iridge@gmail.com> | 2017-02-11 03:40:25 +0900 |
---|---|---|
committer | Takuya Noguchi <tak.noguchi.iridge@gmail.com> | 2017-03-07 07:54:13 +0900 |
commit | 2742fe6fd4f0a65bbd7f4d698ea009d6a6db63e7 (patch) | |
tree | 1126588231cf6e2142b0467dc3c073bb8b03d0c3 /spec/javascripts | |
parent | 6902f9502b0df42fb071ca2fddc30fb21eb861e4 (diff) | |
download | gitlab-ce-2742fe6fd4f0a65bbd7f4d698ea009d6a6db63e7.tar.gz |
Avoid calling Build#trace_with_state for performance
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/build_spec.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/javascripts/build_spec.js b/spec/javascripts/build_spec.js index 0bd50588f5a..fe7f3d2e9c4 100644 --- a/spec/javascripts/build_spec.js +++ b/spec/javascripts/build_spec.js @@ -9,12 +9,6 @@ require('vendor/jquery.nicescroll'); describe('Build', () => { const BUILD_URL = `${gl.TEST_HOST}/frontend-fixtures/builds-project/builds/1`; - // see spec/factories/ci/builds.rb - const BUILD_TRACE = 'BUILD TRACE'; - // see lib/ci/ansi2html.rb - const INITIAL_BUILD_TRACE_STATE = window.btoa(JSON.stringify({ - offset: BUILD_TRACE.length, n_open_tags: 0, fg_color: null, bg_color: null, style_mask: 0, - })); preloadFixtures('builds/build-with-artifacts.html.raw'); @@ -42,7 +36,7 @@ describe('Build', () => { expect(this.build.buildUrl).toBe(`${BUILD_URL}.json`); expect(this.build.buildStatus).toBe('success'); expect(this.build.buildStage).toBe('test'); - expect(this.build.state).toBe(INITIAL_BUILD_TRACE_STATE); + expect(this.build.state).toBe(''); }); it('only shows the jobs matching the current stage', () => { @@ -108,7 +102,7 @@ describe('Build', () => { expect($.ajax.calls.count()).toBe(2); let [{ url, dataType, success, context }] = $.ajax.calls.argsFor(1); expect(url).toBe( - `${BUILD_URL}/trace.json?state=${encodeURIComponent(INITIAL_BUILD_TRACE_STATE)}`, + `${BUILD_URL}/trace.json?state=`, ); expect(dataType).toBe('json'); expect(success).toEqual(jasmine.any(Function)); |