fix failing bookmarklet specs (wait for js to finish)
This commit is contained in:
parent
9d11748486
commit
932fb186e3
2 changed files with 15 additions and 9 deletions
|
|
@ -24,6 +24,8 @@
|
|||
window.setTimeout(window.close, 2000, true);
|
||||
});
|
||||
|
||||
// this has to happen after the publisher has finished loading, otherwise
|
||||
// the textarea is cleared again by the initialization of the mentions plugin
|
||||
$(function(){
|
||||
$("#publisher #status_message_fake_text").val(contents);
|
||||
$("#publisher #status_message_text").val(contents);
|
||||
|
|
|
|||
|
|
@ -22,14 +22,18 @@ describe("bookmarklet", function() {
|
|||
describe("prefilled bookmarklet", function(){
|
||||
it('fills in some text into the publisher', function(){
|
||||
spec.loadFixture('prefilled_bookmarklet');
|
||||
_.defer(function() {
|
||||
expect($("#publisher #status_message_fake_text").val() == "").toBeFalsy();
|
||||
expect($("#publisher #status_message_text").val() == "").toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
it('handles dirty input well', function(){
|
||||
spec.loadFixture('prefilled_bookmarklet_dirty');
|
||||
_.defer(function() {
|
||||
expect($("#publisher #status_message_fake_text").val() == "").toBeFalsy();
|
||||
expect($("#publisher #status_message_text").val() == "").toBeFalsy();
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue