Commit 0f345935 authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Fatih Acet

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.
parent 32fe9ad2
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
return expect(Mousetrap.pause).toHaveBeenCalled(); return expect(Mousetrap.pause).toHaveBeenCalled();
}); });
return it('removes textarea styling', function() { return it('removes textarea styling', function() {
$('textarea').attr('style', 'height: 400px'); $('.notes-form textarea').attr('style', 'height: 400px');
enterZen(); enterZen();
return expect('textarea').not.toHaveAttr('style'); return expect($('.notes-form textarea')).not.toHaveAttr('style');
}); });
}); });
describe('in use', function() { describe('in use', function() {
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
}); });
return it('exits on Escape', function() { return it('exits on Escape', function() {
escapeKeydown(); escapeKeydown();
return expect($('.zen-backdrop')).not.toHaveClass('fullscreen'); return expect($('.notes-form .zen-backdrop')).not.toHaveClass('fullscreen');
}); });
}); });
return describe('on exit', function() { return describe('on exit', function() {
...@@ -64,15 +64,15 @@ ...@@ -64,15 +64,15 @@
}); });
enterZen = function() { enterZen = function() {
return $('.js-zen-enter').click(); return $('.notes-form .js-zen-enter').click();
}; };
exitZen = function() { // Ohmmmmmmm exitZen = function() { // Ohmmmmmmm
return $('.js-zen-leave').click(); return $('.notes-form .js-zen-leave').click();
}; };
escapeKeydown = function() { escapeKeydown = function() {
return $('textarea').trigger($.Event('keydown', { return $('.notes-form textarea').trigger($.Event('keydown', {
keyCode: 27 keyCode: 27
})); }));
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment