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);
|
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(){
|
$(function(){
|
||||||
$("#publisher #status_message_fake_text").val(contents);
|
$("#publisher #status_message_fake_text").val(contents);
|
||||||
$("#publisher #status_message_text").val(contents);
|
$("#publisher #status_message_text").val(contents);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/* Copyright (c) 2010-2012, Diaspora Inc. This file is
|
/* Copyright (c) 2010-2012, Diaspora Inc. This file is
|
||||||
* licensed under the Affero General Public License version 3 or later. See
|
* licensed under the Affero General Public License version 3 or later. See
|
||||||
* the COPYRIGHT file.
|
* the COPYRIGHT file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
describe("bookmarklet", function() {
|
describe("bookmarklet", function() {
|
||||||
|
|
||||||
|
|
@ -22,14 +22,18 @@ describe("bookmarklet", function() {
|
||||||
describe("prefilled bookmarklet", function(){
|
describe("prefilled bookmarklet", function(){
|
||||||
it('fills in some text into the publisher', function(){
|
it('fills in some text into the publisher', function(){
|
||||||
spec.loadFixture('prefilled_bookmarklet');
|
spec.loadFixture('prefilled_bookmarklet');
|
||||||
expect($("#publisher #status_message_fake_text").val() == "").toBeFalsy();
|
_.defer(function() {
|
||||||
expect($("#publisher #status_message_text").val() == "").toBeFalsy();
|
expect($("#publisher #status_message_fake_text").val() == "").toBeFalsy();
|
||||||
|
expect($("#publisher #status_message_text").val() == "").toBeFalsy();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('handles dirty input well', function(){
|
it('handles dirty input well', function(){
|
||||||
spec.loadFixture('prefilled_bookmarklet_dirty');
|
spec.loadFixture('prefilled_bookmarklet_dirty');
|
||||||
expect($("#publisher #status_message_fake_text").val() == "").toBeFalsy();
|
_.defer(function() {
|
||||||
expect($("#publisher #status_message_text").val() == "").toBeFalsy();
|
expect($("#publisher #status_message_fake_text").val() == "").toBeFalsy();
|
||||||
|
expect($("#publisher #status_message_text").val() == "").toBeFalsy();
|
||||||
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue