Skip to content

Commit

Permalink
updated automated tests to cater for the new page-width setting
Browse files Browse the repository at this point in the history
  • Loading branch information
danielweck committed Mar 8, 2016
1 parent ba08b99 commit cd8d330
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/js/ReaderSettingsDialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
define(['./ModuleConfig', 'hgn!readium_js_viewer_html_templates/settings-dialog.html', './ReaderSettingsDialog_Keyboard', 'i18nStrings', './Dialogs', 'Settings', './Keyboard'], function(moduleConfig, SettingsDialog, KeyboardSettings, Strings, Dialogs, Settings, Keyboard){

// change these values to affec the default state of the application's preferences at first-run.
var defaultSettings = {
fontSize: 100,
syntheticSpread: "auto",
Expand Down
21 changes: 17 additions & 4 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,30 @@ console.log(config.browser.browserName);

});

it('test margins', function(){
// it('test margins', function(){
// return browser
// .openSettingsDialog()
// .elementByCss('#tab-butt-layout')
// .click()
// .elementByCss('#margin-size-input')
// .isDisplayed()
// .should.eventually.be.true
// .elementByCss('#margin-size-input')
// .getValue()
// .should.become('60');

// });
it('test page width', function(){
return browser
.openSettingsDialog()
.elementByCss('#tab-butt-layout')
.click()
.elementByCss('#margin-size-input')
.elementByCss('#column-max-width-input')
.isDisplayed()
.should.eventually.be.true
.elementByCss('#margin-size-input')
.elementByCss('#column-max-width-input')
.getValue()
.should.become('60');
.should.become('550');

});

Expand Down

0 comments on commit cd8d330

Please sign in to comment.