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.
This commit is contained in:
parent
32fe9ad24e
commit
0f345935ca
1 changed files with 6 additions and 6 deletions
|
@ -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 @@
|
||||||
});
|
});
|
||||||
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 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
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
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue