-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit updates the balance report end to end tests to work correctly with the new configuration page.
- Loading branch information
Showing
9 changed files
with
64 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
/* global browser, element, by */ | ||
|
||
const FU = require('../FormUtils'); | ||
/* global element, by */ | ||
|
||
module.exports = { | ||
mainSelector : '[bh-fiscal-period-select]', | ||
set : function set(fiscal_year_id, periodFrom_id, periodTo_id, id) { | ||
var opts; | ||
/** return selector for an option element */ | ||
function getValue(id) { | ||
return by.css('option[value="number:?"]'.replace('?', id)); | ||
} | ||
set : function set(fiscalYearId, periodFromId, periodToId, id) { | ||
const getValue = ident => by.css(`option[value="number:${ident}"]`); | ||
|
||
const bhFiscalPeriod = (id) ? element(by.id(id)) : element(by.css(this.mainSelector)); | ||
|
||
opts = bhFiscalPeriod.element(by.model('$ctrl.selectedFiscal')); | ||
opts.element(getValue(fiscal_year_id)).click(); | ||
let opts = bhFiscalPeriod.element(by.model('$ctrl.selectedFiscal')); | ||
opts.element(getValue(fiscalYearId)).click(); | ||
|
||
opts = bhFiscalPeriod.element(by.model('$ctrl.selectedPeriodFrom')); | ||
opts.element(getValue(periodFrom_id)).click(); | ||
opts.element(getValue(periodFromId)).click(); | ||
|
||
opts = bhFiscalPeriod.element(by.model('$ctrl.selectedPeriodTo')); | ||
opts.element(getValue(periodTo_id)).click(); | ||
opts.element(getValue(periodToId)).click(); | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* global element, by */ | ||
|
||
module.exports = { | ||
selector : '[data-bh-yes-no-radios]', | ||
|
||
set : (value, id) => { | ||
|
||
// get the root value of the | ||
const root = element(id ? by.id(id) : by.css(this.selector)); | ||
|
||
// construct a locator for the value | ||
const locator = `[data-choice="${value}"]`; | ||
|
||
// get the appropriate option by the locator | ||
const option = root.element(by.css(locator)); | ||
|
||
// click it! | ||
option.click(); | ||
}, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters