-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add automated tests? #101
Comments
Hey @HonkingGoose, Can I work on implementing automated tests using Cypress on this one? I am fairly new to front-end testing and this seems to be a good task for me to learn more. |
Sure, go ahead. |
I have added cypress's basic config in a PR and will add new tests for most basic functionality like:
@HonkingGoose Do we need to make any updates to docs regarding the cypress testing? I think we can add this: To write more tests using cypress, follow these steps: |
Cool! I think we should install Testing Libary as a development dependency as well. It makes writing tests easier. But I don't know how to set up Testing Library so it works with Cypress. 😞 @Belco90 are you willing to help us with Testing Library? If not that's fine as well. 😉 |
Sure! It should be a matter of installing Cypress Testing Library and then extending Feel free to reach out if you struggle to set it up! |
Someone suggested adding Cypress tests to the upstream
It sounds to me like adding, or even using, Cypress tests is the wrong way to go for us. Even the maintainer of the project doesn't see how it can work for them. 😄 I'll let @rarkins decide what's best, based on this information. Footnotes |
We now also benefit from tests built into mkdocs:
So I'm thinking of closing this issue as done enough. |
What would you like to be able to do?
When I made PR #97, I forgot to check the display of our config presets page. This means we deployed a change that was not ready for production. 😞
It easy to miss bad changes like this when testing manually. It also means that updates to Material for MkDocs are risky.
I would like to have some automated tests that check for visual changes, so that unintended visual regressions are caught by the machine.
I would also like to have some basic tests that check if things like search, sidebar items, previous page/next page button, light/dark mode all work properly.
Did you already have any implementation ideas?
We could probably use Cypress 1 to test the functionality of our docs pages.
I'm not really familiar with any way to test for visual changes yet.
Footnotes
https://www.cypress.io/ ↩
The text was updated successfully, but these errors were encountered: