30 lines
894 B
JavaScript
30 lines
894 B
JavaScript
describe("font select", function(){
|
|
//create a new pad before each test run
|
|
beforeEach(function(cb){
|
|
helper.newPad(cb);
|
|
this.timeout(5000);
|
|
});
|
|
|
|
it("makes text monospace", function(done) {
|
|
var inner$ = helper.padInner$;
|
|
var chrome$ = helper.padChrome$;
|
|
|
|
//click on the settings button to make settings visible
|
|
var $settingsButton = chrome$(".buttonicon-settings");
|
|
$settingsButton.click();
|
|
|
|
//get the font menu and monospace option
|
|
var $viewfontmenu = chrome$("#viewfontmenu");
|
|
var $monospaceoption = $viewfontmenu.find("[value=monospace]");
|
|
|
|
//select monospace and fire change event
|
|
$monospaceoption.attr('selected','selected');
|
|
$viewfontmenu.change();
|
|
|
|
//check if font changed to monospace
|
|
var fontFamily = inner$("body").css("font-family").toLowerCase();
|
|
expect(fontFamily).to.be("monospace");
|
|
|
|
done();
|
|
});
|
|
});
|