-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
RFC: E2E Testing #3056
Comments
Hi, We already have e2e tests that basically generate a fresh new D2 website and try to yarn build it. But that could be a nice addition to have additional end2end tests to verify the site's behavior. Do you have in mind what kind of behavior you want to check with these tests? I'd rather use Cypress than Selenium.
|
I was thinking of testing some of the default pages such as home, blog, showcase, and community just to verify that everything renders properly. We can make this expandable to include things such as buttons and links. |
I think if we create a component library for the classic theme that would help test individual components in a storybook. (#3065). I don't think it's needed to "verify that everything renders properly". Visual tests should rather be done in isolation, like in Storybook/Chromatic, and the nature of Docusaurus being a static site means that if things don't render properly, the site will simply not build. But that could be interesting to have cypress tests running on top of the classic template, to check some behavior is ok, like maybe the dark mode switch, basic navigation, search integration... |
💥 Proposal
As the codebase grows, it would be beneficial to add more/different kinds of testing strategies. I think expanding E2E testing with an automation tool like Selenium could improve coverage.
NextJS implemented this style of tesing on top of all of their other unit tests and it works very well.
I can start a draft if this gets approved because I have an idea on how it could be implemented.
Have you read the Contributing Guidelines on issues?
Yes
The text was updated successfully, but these errors were encountered: