diff options
author | Alfredo Sumaran <a.sumaran@gmail.com> | 2016-12-29 05:37:43 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-01-04 23:37:54 +0300 |
commit | 0f345935ca5c1fa42b3ed67166cc6e5845160b41 (patch) | |
tree | 35bb04e40bfb5108540fa199809eca3b16d70b1c /spec/javascripts/zen_mode_spec.js | |
parent | 32fe9ad24ecd14a64dcf308869e78c316f74aa3b (diff) |
Make sure elements share the same scope
Since there are multiple instances of text editors on the current fixture file we will use the one that creates a comment.
Diffstat (limited to 'spec/javascripts/zen_mode_spec.js')
-rw-r--r-- | spec/javascripts/zen_mode_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/javascripts/zen_mode_spec.js b/spec/javascripts/zen_mode_spec.js index d80ce5a7f7e..2723956a680 100644 --- a/spec/javascripts/zen_mode_spec.js +++ b/spec/javascripts/zen_mode_spec.js @@ -32,9 +32,9 @@ return expect(Mousetrap.pause).toHaveBeenCalled(); }); return it('removes textarea styling', function() { - $('textarea').attr('style', 'height: 400px'); + $('.notes-form textarea').attr('style', 'height: 400px'); enterZen(); - return expect('textarea').not.toHaveAttr('style'); + return expect($('.notes-form textarea')).not.toHaveAttr('style'); }); }); describe('in use', function() { @@ -43,7 +43,7 @@ }); return it('exits on Escape', function() { escapeKeydown(); - return expect($('.zen-backdrop')).not.toHaveClass('fullscreen'); + return expect($('.notes-form .zen-backdrop')).not.toHaveClass('fullscreen'); }); }); return describe('on exit', function() { @@ -64,15 +64,15 @@ }); enterZen = function() { - return $('.js-zen-enter').click(); + return $('.notes-form .js-zen-enter').click(); }; exitZen = function() { // Ohmmmmmmm - return $('.js-zen-leave').click(); + return $('.notes-form .js-zen-leave').click(); }; escapeKeydown = function() { - return $('textarea').trigger($.Event('keydown', { + return $('.notes-form textarea').trigger($.Event('keydown', { keyCode: 27 })); }; |