diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-10-06 23:36:15 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-10-11 19:02:55 +0300 |
commit | 03cd536b54b148eb59cabfa735c0ec6820fc2266 (patch) | |
tree | 3a872a59747df68a14fa432699c6dceafff40de0 /spec/javascripts/merge_request_tabs_spec.js | |
parent | fe11c5fde7c0c748eb370f09715114fd5a7d8577 (diff) |
Cleanup data-page attribute after each Karma test
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/38871
Diffstat (limited to 'spec/javascripts/merge_request_tabs_spec.js')
-rw-r--r-- | spec/javascripts/merge_request_tabs_spec.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/javascripts/merge_request_tabs_spec.js b/spec/javascripts/merge_request_tabs_spec.js index ccdbfcba692..18916c5aa97 100644 --- a/spec/javascripts/merge_request_tabs_spec.js +++ b/spec/javascripts/merge_request_tabs_spec.js @@ -277,7 +277,7 @@ import 'vendor/jquery.scrollTo'; describe('loadDiff', function () { beforeEach(() => { loadFixtures('merge_requests/diff_comment.html.raw'); - spyOn(window.gl.utils, 'getPagePath').and.returnValue('merge_requests'); + $('body').attr('data-page', 'projects:merge_requests:show'); window.gl.ImageFile = () => {}; window.notes = new Notes('', []); spyOn(window.notes, 'toggleDiffNote').and.callThrough(); @@ -286,6 +286,9 @@ import 'vendor/jquery.scrollTo'; afterEach(() => { delete window.gl.ImageFile; delete window.notes; + + // Undo what we did to the shared <body> + $('body').removeAttr('data-page'); }); it('requires an absolute pathname', function () { |