False negatives if element is in shadowDom
bennypowers opened this issue ยท comments
In some cases, elements in shadowDom will fail even though they are hidden.
Fails with Error: expected section#activity[hidden] to not be displayed, but it was as
๐
test('Auth view should be visible by default', () => {
initialState.$.activity.should.not.be.displayed;
});
Passes! ๐ป
// NOTE: Passes!
test('Auth view should be visible by default', () => {
window.getComputedStyle(initialState.$.activity).display.should.contain('none');
});
I propose changing chai-dom.js:279 to:
actual = el.style.display || window.getComputedStyle(el).display;