Merge pull request #1575 from ether/fix-tests

fix some tests
pull/1569/merge
Marcel Klehr 2013-03-02 05:03:38 -08:00
commit 827c1291b5
3 changed files with 9 additions and 7 deletions

View File

@ -100,8 +100,8 @@ describe("embed links", function(){
//open share dropdown //open share dropdown
chrome$(".buttonicon-embed").click(); chrome$(".buttonicon-embed").click();
//check read only checkbox, a bit hacky chrome$('#readonlyinput').click();
chrome$('#readonlyinput').attr('checked','checked').click().attr('checked','checked'); chrome$('#readonlyinput:checkbox:not(:checked)').attr('checked', 'checked');
//get the link of the share field + the actual pad url and compare them //get the link of the share field + the actual pad url and compare them
var shareLink = chrome$("#linkinput").val(); var shareLink = chrome$("#linkinput").val();
@ -119,7 +119,9 @@ describe("embed links", function(){
//open share dropdown //open share dropdown
chrome$(".buttonicon-embed").click(); chrome$(".buttonicon-embed").click();
//check read only checkbox, a bit hacky //check read only checkbox, a bit hacky
chrome$('#readonlyinput').attr('checked','checked').click().attr('checked','checked'); chrome$('#readonlyinput').click();
chrome$('#readonlyinput:checkbox:not(:checked)').attr('checked', 'checked');
//get the link of the share field + the actual pad url and compare them //get the link of the share field + the actual pad url and compare them
var embedCode = chrome$("#embedinput").val(); var embedCode = chrome$("#embedinput").val();
@ -129,5 +131,6 @@ describe("embed links", function(){
done(); done();
}); });
}); });
}); });
}); });

View File

@ -19,6 +19,7 @@ describe("font select", function(){
//select monospace and fire change event //select monospace and fire change event
$monospaceoption.attr('selected','selected'); $monospaceoption.attr('selected','selected');
$viewfontmenu.val("monospace");
$viewfontmenu.change(); $viewfontmenu.change();
//check if font changed to monospace //check if font changed to monospace

View File

@ -56,10 +56,8 @@ describe("Language select and change", function(){
//click the language button //click the language button
var $language = chrome$("#languagemenu"); var $language = chrome$("#languagemenu");
var $languageoption = $language.find("[value=en]"); //select english
$language.val("en");
//select german
$languageoption.attr('selected','selected');
$language.change(); $language.change();
//get the value of the bold button //get the value of the bold button