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 e2e testing #280

Merged
merged 17 commits into from
Apr 7, 2020
Merged

Cypress e2e testing #280

merged 17 commits into from
Apr 7, 2020

Conversation

sgratzl
Copy link
Member

@sgratzl sgratzl commented Apr 3, 2020

closes #227 depends on #279

prerequisites:

  • branch is up-to-date with the branch to be merged with, i.e. develop
  • build is successful
  • code is cleaned up and formatted
  • tested with Firefox 52, Firefox 57+, Chrome 64+, MS Edge 16+

Summary

wip of using cypress to run e2e tests.

Notes

  • as part of this the location of the typings have changed to /build/src
  • the idea is to test close to the UMD case. So, as if one uses the builder. Thus, the bundled/compiled version of LineUp.js is used.

Local testing

Variant 1: with prebuilt LineUp

npm run compile
npm run build:prod
npm run cy:open

Variant 2: with webpack-dev-server

First shell:

npm run compile
npm start

Second shell:

npm run cy:start

@sgratzl sgratzl requested a review from thinkh April 3, 2020 11:44
@sgratzl sgratzl linked an issue Apr 3, 2020 that may be closed by this pull request
@sgratzl
Copy link
Member Author

sgratzl commented Apr 3, 2020

local testing

npm run compile
npm run build:prod
npm run cy:open

@sgratzl sgratzl marked this pull request as ready for review April 6, 2020 08:50
@sgratzl
Copy link
Member Author

sgratzl commented Apr 6, 2020

I added a simple test for #275 we can add more tests on the fly

Copy link
Member

@thinkh thinkh left a comment

Choose a reason for hiding this comment

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

Very nice feature! I just tested it and it works like charm.

@sgratzl How should we proceed with this PR? Should I wait for further implementation or merge it once you addressed my two minor change requests?

Notes from my test run:

I installed the npm dependencies in my Linux subsystem for Windows (WSL1) and ran npm run cy:open. I waited for a few minutes and then cancled the verification step.

> cypress open

It looks like this is your first time using Cypress: 4.3.0

  ⠋  Verifying Cypress can run /home/user/.cache/Cypress/4.3.0/Cypress

As alternative I downloaded the Cypress Desktop and loaded the LineUp repository there. Then everything worked like it should be and all tests are green.

cypress/integration/big.spec.ts Outdated Show resolved Hide resolved
.circleci/config.yml Show resolved Hide resolved
@thinkh thinkh added the lineup: v4 All issues related to LineUp v4 label Apr 7, 2020
@sgratzl
Copy link
Member Author

sgratzl commented Apr 7, 2020

@sgratzl How should we proceed with this PR? Should I wait for further implementation or merge it once you addressed my two minor change requests?

merge then we can start using it

Copy link
Member

@thinkh thinkh left a comment

Choose a reason for hiding this comment

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

Sounds good!

@thinkh thinkh merged commit ff97630 into lineup-v4 Apr 7, 2020
@thinkh thinkh deleted the sgratzl/cypress branch April 7, 2020 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lineup: v4 All issues related to LineUp v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert demos to actual unit tests
2 participants