Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

False negatives if element is in shadowDom #22

Open
bennypowers opened this issue Jun 26, 2017 · 0 comments
Open

False negatives if element is in shadowDom #22

bennypowers opened this issue Jun 26, 2017 · 0 comments

Comments

@bennypowers
Copy link

bennypowers commented Jun 26, 2017

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant