2012-10-04 21:44:21 +02:00
|
|
|
describe("font select", function(){
|
|
|
|
//create a new pad before each test run
|
|
|
|
beforeEach(function(cb){
|
2012-10-08 14:13:35 +02:00
|
|
|
helper.newPad(cb);
|
2012-11-02 00:19:59 +01:00
|
|
|
this.timeout(60000);
|
2012-10-04 21:44:21 +02:00
|
|
|
});
|
|
|
|
|
2012-10-08 14:13:35 +02:00
|
|
|
it("makes text monospace", function(done) {
|
|
|
|
var inner$ = helper.padInner$;
|
|
|
|
var chrome$ = helper.padChrome$;
|
2012-10-04 21:44:21 +02:00
|
|
|
|
2012-10-08 14:13:35 +02:00
|
|
|
//click on the settings button to make settings visible
|
|
|
|
var $settingsButton = chrome$(".buttonicon-settings");
|
2012-10-04 21:44:21 +02:00
|
|
|
$settingsButton.click();
|
|
|
|
|
2012-10-08 14:13:35 +02:00
|
|
|
//get the font menu and monospace option
|
|
|
|
var $viewfontmenu = chrome$("#viewfontmenu");
|
|
|
|
var $monospaceoption = $viewfontmenu.find("[value=monospace]");
|
2012-10-08 00:34:29 +02:00
|
|
|
|
2012-10-08 14:13:35 +02:00
|
|
|
//select monospace and fire change event
|
2012-10-08 00:34:29 +02:00
|
|
|
$monospaceoption.attr('selected','selected');
|
2012-10-08 14:13:35 +02:00
|
|
|
$viewfontmenu.change();
|
2012-10-08 00:34:29 +02:00
|
|
|
|
2012-10-08 14:13:35 +02:00
|
|
|
//check if font changed to monospace
|
|
|
|
var fontFamily = inner$("body").css("font-family").toLowerCase();
|
|
|
|
expect(fontFamily).to.be("monospace");
|
2012-10-08 00:34:29 +02:00
|
|
|
|
2012-10-08 14:13:35 +02:00
|
|
|
done();
|
2012-10-04 21:44:21 +02:00
|
|
|
});
|
|
|
|
});
|