Has anyone got this working with playwright component testing? #909
adrhumphreys
started this conversation in
General
Replies: 2 comments 2 replies
-
Well, starting from a fresh repo things were easier and just ran into some issues with the React.createElement import going weird (fix is to just update esbuild's jsxInject) Example repo of it all working together: https://github.com/adrhumphreys/vanilla-extract-nextjs |
Beta Was this translation helpful? Give feedback.
1 reply
-
@adrhumphreys Did you have any luck getting this working? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just been having a look at how we'd go about writing component tests and found playwright component testing which looks really promising.
I've set up a test with the
Button.spec.tsx
:A button component
Button.tsx
:And then the css which is
Button.css.ts
I've then configured the
playwright-ct.config.ts
to include the vite plugin for vanilla extract, but when running the tests I get theStyles were unable to be assigned to a file.
errorAlso worth mentioning that removing the
.ts.css
import will result in it working (so not a mis-setup in general)Beta Was this translation helpful? Give feedback.
All reactions