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

feat: start of e2e testing #1201

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

dustinwloring1988
Copy link
Collaborator

image

Testing with playwright:

  • updated documentation
  • all tests passing
  • requirements playwright

simple to use and generate a html report with screenshots if the test fails.

WIP e2e-testing
now working
@dustinwloring1988 dustinwloring1988 changed the title Feat: e2e testing WIP feat: e2e testing WIP Jan 28, 2025
@dustinwloring1988 dustinwloring1988 changed the title feat: e2e testing WIP feat: e2e testing Jan 28, 2025
@dustinwloring1988 dustinwloring1988 changed the title feat: e2e testing feat: start of e2e testing Jan 28, 2025
@dustinwloring1988
Copy link
Collaborator Author

@thecodacus @coleam00
Are we interested in doing tests like this, if not no worries I will just close this?

@coleam00
Copy link
Collaborator

@thecodacus @coleam00 Are we interested in doing tests like this, if not no worries I will just close this?

Yeah we talked about wanting to do Playwright tests for a while so this looks great!

Copy link
Collaborator

@AriPerkkio AriPerkkio left a 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

@thecodacus
Copy link
Collaborator

@thecodacus @coleam00 Are we interested in doing tests like this, if not no worries I will just close this?

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

package-lock.json Outdated Show resolved Hide resolved
@thecodacus
Copy link
Collaborator

I believe @mrsimpson can review this better than me

@thecodacus thecodacus closed this Feb 6, 2025
@thecodacus thecodacus reopened this Feb 6, 2025
@thecodacus thecodacus requested a review from mrsimpson February 6, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants