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

Cypress test #154

Merged
merged 2 commits into from
Jun 24, 2022
Merged

Cypress test #154

merged 2 commits into from
Jun 24, 2022

Conversation

huyenuet
Copy link
Contributor

@huyenuet huyenuet commented Jun 22, 2022

Features

  • Setup cypress
  • Add cypress e2e test

@netlify
Copy link

netlify bot commented Jun 22, 2022

Deploy Preview for jest-preview-library canceled.

Name Link
🔨 Latest commit d0a0376
🔍 Latest deploy log https://app.netlify.com/sites/jest-preview-library/deploys/62b5854df2900c0008b51168

@nvh95
Copy link
Owner

nvh95 commented Jun 22, 2022

@huyenuet Thank you so much for your help.
Since we are testing the documentation site www.jest-preview.com. So it's better if we put the testing code inside website folder.
Can you help to move the cypress code to website folder (and revert the changes in package.json, package-lock.json` as well)?

@nvh95
Copy link
Owner

nvh95 commented Jun 22, 2022

One more thing. Can you use prettier to format the source code? We already provide a CLI npm run prettier:fix. You can run it before you commit code.

@huyenuet
Copy link
Contributor Author

Sure @nvh95

@nvh95
Copy link
Owner

nvh95 commented Jun 22, 2022

Can you revert these changes in package-lock.json as well?
@ntt261298 Can you guide @huyenuet on this? Thanks.

@nvh95
Copy link
Owner

nvh95 commented Jun 23, 2022

@huyenuet Please help to commit the change in website/package-lock.json as well. Thanks.

@nvh95
Copy link
Owner

nvh95 commented Jun 23, 2022

After a while of consideration, I think we shouldn't put cypress code in website folder. The reason is the deployment on Netlify will take longer since it needs to install cypress (which is a big package). I don't see that Netlify offer us to opt-out devDependencies packages in Netlify Dashboard.

Moreover, since the new cypress code interact with the actual website on www.jest-preview.com. It's not a part of website source code. We can create a new folder under root and name it something like e2e-docs.

@huyenuet huyenuet force-pushed the cypress-test branch 2 times, most recently from b3840ff to 3b391ca Compare June 23, 2022 12:52
@huyenuet
Copy link
Contributor Author

@nvh95 I updated the PR per your request. The new folder name was set to "docs-e2e-testing".

@nvh95 nvh95 requested review from ntt261298 and nvh95 June 23, 2022 13:03
Copy link
Owner

@nvh95 nvh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR looks great so far. I left 2 small comments.

@@ -0,0 +1,14 @@
{
"name": "e2e-testing-for-docs",
"version": "1.0.0",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change to

Suggested change
"version": "1.0.0",
"version": "0.0.1",

"cypress-test": "cypress open"
},
"author": "huyenuet",
"license": "ISC",
Copy link
Owner

@nvh95 nvh95 Jun 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the license to MIT

Copy link
Owner

@nvh95 nvh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nvh95 nvh95 merged commit 5be3cf4 into nvh95:main Jun 24, 2022
@nvh95
Copy link
Owner

nvh95 commented Jun 24, 2022

Thank you very much @huyenuet. Welcome to contributors 🎉🎉🎉
@all-contributors please add @huyenuet for test

@allcontributors
Copy link
Contributor

@nvh95

I've put up a pull request to add @huyenuet! 🎉

@nvh95 nvh95 self-assigned this Jun 24, 2022
@nvh95 nvh95 added the future work needed Merged PR or Closed Issue but need to visit in the future label Jun 24, 2022
@nvh95
Copy link
Owner

nvh95 commented Jun 24, 2022

@nvh95

  • To add GitHub Actions to run it periodically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future work needed Merged PR or Closed Issue but need to visit in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants