Closed thenbe closed 1 year ago
Hey, sorry for not getting back to you sooner.
I did have a play around with this and I just couldn't figure it out - even the simple example of the play / pause button just didn't seem to recognize the markup in the tests. i.e. the test was broken, but the markup was correct.
I need to revisit it and see what I wasn't understanding.
Please feel free to take your time. If there's anything, just let me know how I can help.
Thanks again for this, I had another look at both Playwright and vitest + testing-library and I think Playwright is definitely the one to go with. But I don't think the component testing is worth the effort, esp. while it's still experimental, and the doc refactor means the example pages are now easier to use for testing as well so I'm going with that approach.
I'll have a look at the tests included with this though and try to pull those in.
So, sorry it wasn't merged as it was, but this was really useful to point me in the right direction.
I do recall it being it rough around the edges. And given that it's still experimental, I have to agree that the effort might not be worth it. Testing the doc pages directly using Playwright (as opposed to "Playwright component testing") does look like a better choice, especially at the moment.
Either way, thanks for continuing to maintain this library.
Originally, I had updated the tests while using vitest. But not being able to debug the tests in
--headed
made for a frustrating experience. So I used playwright instead. Tests can be run withpnpm run test
(orpnpm run test --ui
for watch mode).Anyways, there are a couple of failing tests which (I think) are failing legitimately (as opposed to a bad test implementation). To view the trace/video, you can either:
pnpm playwright show-report playwright-report
pnpm run test || pnpm playwright show-report