-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[BUG] Experimental CT: Svelte named Slots #15820
Comments
related to: sveltejs/svelte#2588 |
I was under the impression that Playwright had some custom code that did this. Injecting slots programmatically when mounting Svelte components has never been a feature in Svelte 3. It does, however, look like it is possible when using an editor like VS Code and the Svelte LSP, this because of an internal handler for the typing of the component that unfortunately has to be exposed. |
I stumble upon this while playing around with component testing for my svelte components. As @aMediocreDad said, seems like passing of slots (default or named) is not working out of the box. @aMediocreDad Did you manage to make it work for your use case by following sveltejs/svelte#2588. Code there does not seem to work for me. |
No, I have not tried using those solutions. We use the same solutions we do for Storybook, which is using a svelte component that wraps the one being tested populating the slot with relevant parameters exposed through props. |
Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Reproduction: https://github.com/aMediocreDad/playwright-svelte-slots-repro
Describe the bug
While this is experimental the FAQ indicates that you can pass (text) to named slots when mounting the Svelte component.
This seems to be wrong. It would, however, be a desirable feature.
The text was updated successfully, but these errors were encountered: