-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
feat: start of e2e testing #1201
base: main
Are you sure you want to change the base?
feat: start of e2e testing #1201
Conversation
WIP e2e-testing
exclude e2e and a few other directories from tests
@thecodacus @coleam00 |
Yeah we talked about wanting to do Playwright tests for a while so this looks great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, if you want these tests to have stable output from the LLM, you could use MSW to intercepts the HTTP calls done on server side. The e2e tests should inject a new Remix route that exposes APIs for controlling MSW that's running on server. That MSW should be configured to intercept all the LLM provider's endpoints you wish to mock. Then you could control the mocks inside each Playwright test, e.g. make the LLM return certain index.html
that's then asserted to be visible on preview.
Related to mswjs/msw#1668
Looks great, I have very little experience on browser testing. but looks good to me. but like @AriPerkkio said we can intercept and mock the llm calls and provide maybe a predictable hardcoded outputs so that we can test all the features with a all the edge cases for different llm outputs |
I believe @mrsimpson can review this better than me |
Testing with playwright:
simple to use and generate a html report with screenshots if the test fails.