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

feat(e2e): add Cypress to the project for E2E testing #399

Merged
merged 1 commit into from Jul 28, 2019
Merged

Conversation

ghiscoding
Copy link
Collaborator

@ghiscoding ghiscoding commented Jul 18, 2019

I think it's time to start looking at adding E2E tests (UI testing). We used to have Selenium back in the days, but that was hard to install and run. The JavaScript world have come a long way and new tools, the best tool that I've found so far and is super easy to install (it's all in the PR) is Cypress.io, it's quite easy to program tests and it works universally. It doesn't need any framework or anything except running an npm command to install it, just run npm install (or yarn) and then run npm run cypress:open or even better if you have VScode, just run the task "Cypress Open GUI" that I added. Here's a quick intro video of Cypress

There's a ton of things we can do with Cypress, drag & drop, click buttons, scroll, etc... and what is funny is that while doing this very quick and basic test, I actually found a bug in the Grid Menu which I'll have to fix later (now fixed in PR #402).

See animated GIF of the very simple test I added for the Grid Menu example. It runs the tests against the GitHub demo page.

Also note, this is just a structure to start with, I intend to add more in the future and also wish (plan) to add this to our build process, so there would be less surprises. First thing to do in the future, would be to start looking into running this locally instead of the now github demo page.

1Zj4DhGOx1

ghiscoding added a commit that referenced this pull request Jul 22, 2019
- found by looking into Cypress E2E tests, ref PR #399
- because there is a grid setColumns, we cannot just remove the excluded columns, if we do it causes some issues when showing/hiding columns later.
- what is better is to simply keep excluded item in the list but simply hide the checkbox from the picker list.
ghiscoding added a commit that referenced this pull request Jul 22, 2019
#402)

- found by looking into Cypress E2E tests, ref PR #399
- because there is a grid setColumns, we cannot just remove the excluded columns, if we do it causes some issues when showing/hiding columns later.
- what is better is to simply keep excluded item in the list but simply hide the checkbox from the picker list.
@6pac 6pac merged commit 6f3c69c into master Jul 28, 2019
@ghiscoding ghiscoding deleted the feat/e2e-cypress branch December 14, 2019 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants