-
Notifications
You must be signed in to change notification settings - Fork 2
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use slot
s instead of pure shadow DOM
#17
Conversation
…ve to pierce) the shadow dom
I wonder if this package would be useful https://open-wc.org/docs/testing/testing-package/... but if we are trying to test inherited styles, I think we will have to test that in the browser. To do that we would need to:
Then we could def test the text content + styles. Not 100% sure if we can do something like |
one other Q: Do you think storybook would be a useful test environment for this? Asking bc our current demo site doesn't really cover all of the features like writing-modes, text alignment, ragging-width, resizing, and style inheritance (now), so I'm wondering if storybook would be an easier way of showcasing all of those things with minimal test cases and getting them in CI at the same time. |
oooo yes! I think that's a great idea :) |
This reverts commit 69d9d52.
Moved inner content on the web component to a
<slot>
element to make cascade behavior more useful. This was good to update, too, because content updates inside the ragger component via JS weren't propagating to the shadow root before this.It would be good to
jsdom
doesn't return anything fromgetComputedStyle
besidevisibility
(added a failing test for this)shadowRoot
's text content after running something likemechanicalragger.innerHTML = "b"
, too, butmechanicalragger.shadowRoot.textContent
, which works fine in the browser, also returns nothing injsdom
. (added a failing test for this)Would be a lot for this project, but maybe we can try headless chrome / Puppeteer / selenium for these tests?
#16