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

RFC: E2E Testing #3056

Open
taylorallen0913 opened this issue Jul 14, 2020 · 3 comments
Open

RFC: E2E Testing #3056

taylorallen0913 opened this issue Jul 14, 2020 · 3 comments
Labels
apprentice Issues that are good candidates to be handled by a Docusaurus apprentice / trainee meta Meta-issue about the project itself. Either project maintenance or a list of other issues.

Comments

@taylorallen0913
Copy link
Contributor

taylorallen0913 commented Jul 14, 2020

💥 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

@taylorallen0913 taylorallen0913 added status: needs triage This issue has not been triaged by maintainers proposal This issue is a proposal, usually non-trivial change labels Jul 14, 2020
@taylorallen0913 taylorallen0913 changed the title RFC: Integration Testing RFC: E2E Testing Jul 14, 2020
@slorber
Copy link
Collaborator

slorber commented Jul 14, 2020

Hi,

We already have e2e tests that basically generate a fresh new D2 website and try to yarn build it.
https://github.com/facebook/docusaurus/blob/master/.github/workflows/e2e-test.yml

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.

@slorber slorber added v2 and removed status: needs triage This issue has not been triaged by maintainers labels Jul 14, 2020
@taylorallen0913
Copy link
Contributor Author

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.

@slorber
Copy link
Collaborator

slorber commented Jul 20, 2020

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...

@Josh-Cena Josh-Cena added meta Meta-issue about the project itself. Either project maintenance or a list of other issues. and removed v2 proposal This issue is a proposal, usually non-trivial change labels Oct 30, 2021
@slorber slorber added the apprentice Issues that are good candidates to be handled by a Docusaurus apprentice / trainee label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apprentice Issues that are good candidates to be handled by a Docusaurus apprentice / trainee meta Meta-issue about the project itself. Either project maintenance or a list of other issues.
Projects
None yet
Development

No branches or pull requests

3 participants