-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Frontend Testing Tracking Issue #4615
Comments
Some testing resources. Playwright docs are excellent (and extensive). The API docs will be the most helpful as we write tests. The page class in particularly will probably be the mots commonly used. When you actually get an element that you want to interact with it will return an instance of Playwright also have a nice document about best practices with some examples: They also have other useful guides (check the sidebar and scroll down). Everything i know about playwright is from trial + error and the official docs. For vitest (untit and integration tests that run in node) we generally use two things.
Testing library DOM functions: https://testing-library.com/docs/queries/about Have a look around other parts of these sites too, testing tools like this often have some nice examples and good best practices that can be useful. |
Doing a bit of an inventory of our test coverage. Probably won't be complete but it is a start.
|
Pretty happy that we are on our way with this now. I don't think we need to track it any more, we have pretty much everything in place. |
Tracking Issue for Frontend tests (E2E, Unit tests, & Visual tests)
Goals
TODOs
End to End Tests
Run tests by:
pnpm test:browser:full
builds frontend and runs testspnpm test:browser:verbose
see all errors/warningspnpm test:browser:debug
opens chromium browser and allows you to step through each line of the testUse
kitchen_sink.spec.ts
as reference.chatbot_multimodal
demo test #4659gr.Interface
test (gr.load()
) maybe fordemo/gpt_j
outbreak_forecast.spec.ts
#4746Unit Tests
Run tests by:
pnpm test:run
Use
Textbox.test.ts
as reference. List based on most used componentsVisual Testing
The text was updated successfully, but these errors were encountered: