Skip to content

Instantly share code, notes, and snippets.

@jimode
Created July 19, 2018 11:09
Show Gist options
  • Save jimode/bb3467ecd9d4798af2e3a9425728f87a to your computer and use it in GitHub Desktop.
Save jimode/bb3467ecd9d4798af2e3a9425728f87a to your computer and use it in GitHub Desktop.
When(/^there is no hover border displayed$/, () => {
const monthlySubscription =
SelectSubscription.monthly.plan.selector;
function getPsuedoAttributeValues(component, selector, cssProperty) {
return window
.getComputedStyle(document.querySelector(component), selector)
.getPropertyValue(cssProperty);
}
const borderBox = browser.execute(
getPsuedoAttributeValues, // run the above getPsuedoAttributeValues method
monthlySubscription, // pass in the component
':after', // pass in the pseudo selector
'border', // pass in the css property to check for attributes
);
expect(borderBox.value).to.eq('2px solid rgba(0, 0, 0, 0)');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment