cucumber-protractor
Version:
POM CukeTractor - Bootstrap your cucumber tests with cucumber, protractor and a structured way of creating page objects and component objects
9 lines (7 loc) • 322 B
JavaScript
module.exports = function checkIsEnabled(locatorKey, enabledOrDisabled) {
const el = this.getCurrentPage().getElement(locatorKey);
const elIsEnabled = el.isEnabled();
return enabledOrDisabled === 'enabled' ?
expect(elIsEnabled).to.eventually.equal(true) :
expect(elIsEnabled).to.eventually.equal(false);
};