mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
tests: fix font select test
This commit is contained in:
parent
f925d5fc74
commit
02af7d0c2d
1 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@ describe("font select", function(){
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("makes text monospace", function(done) {
|
it("makes text RobotoMono", function(done) {
|
||||||
var inner$ = helper.padInner$;
|
var inner$ = helper.padInner$;
|
||||||
var chrome$ = helper.padChrome$;
|
var chrome$ = helper.padChrome$;
|
||||||
|
|
||||||
|
@ -13,19 +13,19 @@ describe("font select", function(){
|
||||||
var $settingsButton = chrome$(".buttonicon-settings");
|
var $settingsButton = chrome$(".buttonicon-settings");
|
||||||
$settingsButton.click();
|
$settingsButton.click();
|
||||||
|
|
||||||
//get the font menu and monospace option
|
//get the font menu and RobotoMono option
|
||||||
var $viewfontmenu = chrome$("#viewfontmenu");
|
var $viewfontmenu = chrome$("#viewfontmenu");
|
||||||
var $monospaceoption = $viewfontmenu.find("[value=monospace]");
|
var $RobotoMonooption = $viewfontmenu.find("[value=RobotoMono]");
|
||||||
|
|
||||||
//select monospace and fire change event
|
//select RobotoMono and fire change event
|
||||||
// $monospaceoption.attr('selected','selected');
|
// $RobotoMonooption.attr('selected','selected');
|
||||||
// commenting out above will break safari test
|
// commenting out above will break safari test
|
||||||
$viewfontmenu.val("monospace");
|
$viewfontmenu.val("RobotoMono");
|
||||||
$viewfontmenu.change();
|
$viewfontmenu.change();
|
||||||
|
|
||||||
//check if font changed to monospace
|
//check if font changed to RobotoMono
|
||||||
var fontFamily = inner$("body").css("font-family").toLowerCase();
|
var fontFamily = inner$("body").css("font-family").toLowerCase();
|
||||||
var containsStr = fontFamily.indexOf("monospace");
|
var containsStr = fontFamily.indexOf("robotomono");
|
||||||
expect(containsStr).to.not.be(-1);
|
expect(containsStr).to.not.be(-1);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
|
Loading…
Reference in a new issue