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 (6 loc) • 313 B
JavaScript
const helper = require('../helper');
module.exports = function checkColour(locatorKey, expectedColour, property) {
const el = this.getCurrentPage().getElement(locatorKey);
return el.getCssValue(property)
.then((colour) => expect(helper.normalizeColorAcrossBrowser(colour)).to.equal(expectedColour));
};