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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Testing Add-On #230

Open
vhscom opened this issue Aug 9, 2022 · 0 comments
Open

Component Testing Add-On #230

vhscom opened this issue Aug 9, 2022 · 0 comments

Comments

@vhscom
Copy link

vhscom commented Aug 9, 2022

This issue is to request addition of Playwright component testing to svelte-add to make set-up easier and better integrated with Svelte apps than the default init scripts provided by Playwright.

There're still decisions to be made and some related discussion here as noted by Ben McCann:
sveltejs/kit#5285. The takeaway I had from reviewing the linked issue is that there are trade-offs on using Playwright for component testing and, as a result, it may not be the default in create-svelte but more of an add-on functionality—which it may make sense never to show as an option to keep project scaffolding simple.

And here's an example from the Svelte dev who made the very awesome meta tags component:
https://github.com/oekazuma/playwright-sveltekit-component-testing

EDIT:

https://youtu.be/-GKRH0KQ_j0 is a Svelte Sirens presentation which shows how to component test with Cypress. After a little trial and error with Playwright Component Testing I can see why they call it experimental as it's a bit painful to get a component mounted at the current time. Learned about the video here from the following very helpful tutorial which covers Playwright setup for Svelte and provides additional component testing resources: https://davipon.hashnode.dev/test-svelte-component-using-vitest-playwright

@vhscom vhscom changed the title Playwright Component Testing Component Testing Add-On Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants