diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-09-06 19:14:34 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-09-09 11:54:27 +0300 |
commit | 96e6fc70b40c51af50bee6c421f7f363acd899d4 (patch) | |
tree | 1bcdec4ae4d83d08c5a2c43573df64edd7d309d7 /spec/javascripts/todos_spec.js | |
parent | 6a1b84c7b450e65eaad6bf016fc9b7310e89784c (diff) |
Import modules instead of using the ones in global namespace
Removes set favicon related methods from global scope
Improves test related with favicon
Removes convertPermissionToBoolean from global scope.
Adds tests for convertPermissionToBoolean - were non existant
Removes setParamInURL from gl.utils
Removes parseIntPagination from gl.utils namespace
Remove normalizeCRLFHeaders from gl.utils namespace
Removes normalizeHeaders from gl.utils namespace
Use gl.utils for filtered search
Fix bad import
Fix broken test by cleaning window.history namespace
Adds changelog
Diffstat (limited to 'spec/javascripts/todos_spec.js')
-rw-r--r-- | spec/javascripts/todos_spec.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/javascripts/todos_spec.js b/spec/javascripts/todos_spec.js index fd492159081..207ad2d6f97 100644 --- a/spec/javascripts/todos_spec.js +++ b/spec/javascripts/todos_spec.js @@ -26,9 +26,10 @@ describe('Todos', () => { describe('meta click', () => { let visitUrlSpy; + let metakeyEvent; beforeEach(() => { - spyOn(gl.utils, 'isMetaClick').and.returnValue(true); + metakeyEvent = $.Event('click', { keyCode: 91, ctrlKey: true }); visitUrlSpy = spyOn(gl.utils, 'visitUrl').and.callFake(() => {}); }); @@ -41,7 +42,7 @@ describe('Todos', () => { done(); }); - todoItem.click(); + $('.todos-list .todo').trigger(metakeyEvent); expect(visitUrlSpy).not.toHaveBeenCalled(); }); |