tests: fix font select test

This commit is contained in:
John McLear 2020-06-03 10:34:13 +00:00
parent f925d5fc74
commit 02af7d0c2d

View file

@ -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();