diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-01-13 16:54:16 -0500 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-01-30 15:38:28 -0500 |
commit | 540da9b283a0884947915d761ddb731379ceaafb (patch) | |
tree | f24e5a412ebfd3e8c222877f4044b63b446ce415 /spec/javascripts/gl_dropdown_spec.js.es6 | |
parent | a0734363b1b2c5073f810f3b189670d4a8ecbc54 (diff) | |
download | gitlab-ce-turbolinks-ee-compat.tar.gz |
Port of 25624-anticipate-obstacles-to-removing-turbolinks to EE.turbolinks-ee-compat
Diffstat (limited to 'spec/javascripts/gl_dropdown_spec.js.es6')
-rw-r--r-- | spec/javascripts/gl_dropdown_spec.js.es6 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/javascripts/gl_dropdown_spec.js.es6 b/spec/javascripts/gl_dropdown_spec.js.es6 index 06fa64b1b4e..b8d39019183 100644 --- a/spec/javascripts/gl_dropdown_spec.js.es6 +++ b/spec/javascripts/gl_dropdown_spec.js.es6 @@ -1,11 +1,10 @@ /* eslint-disable comma-dangle, no-param-reassign, no-unused-expressions, max-len */ -/* global Turbolinks */ /*= require jquery */ /*= require gl_dropdown */ -/*= require turbolinks */ /*= require lib/utils/common_utils */ /*= require lib/utils/type_utility */ +//= require lib/utils/url_utility (() => { const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link'; @@ -112,13 +111,13 @@ expect(this.dropdownContainerElement).toHaveClass('open'); const randomIndex = Math.floor(Math.random() * (this.projectsData.length - 1)) + 0; navigateWithKeys('down', randomIndex, () => { - spyOn(Turbolinks, 'visit').and.stub(); + spyOn(gl.utils, 'visitUrl').and.stub(); navigateWithKeys('enter', null, () => { expect(this.dropdownContainerElement).not.toHaveClass('open'); const link = $(`${ITEM_SELECTOR}:eq(${randomIndex}) a`, this.$dropdownMenuElement); expect(link).toHaveClass('is-active'); const linkedLocation = link.attr('href'); - if (linkedLocation && linkedLocation !== '#') expect(Turbolinks.visit).toHaveBeenCalledWith(linkedLocation); + if (linkedLocation && linkedLocation !== '#') expect(gl.utils.visitUrl).toHaveBeenCalledWith(linkedLocation); }); }); }); |