Some of these is under construction.
- Readme, setup and installation
- proper tests
- tests for plugins
- #41 - Do not attach files with long arguments to child commands - only for parent - enhancement
- #152 - Global hook doesn't have steps for tests in nested suites - bug minor
- #119 - Global After hooks are not being added to test when it has more than one parent suite - bug minor
- #156 - Before/after each are not marked as failed for failed attempts of test when retries >0 - bug minor
- #77 - Mark parent step non-success when some steps have non-success status - enhancement
- #64 - Uncaught:exception step is marked as passed step and all its parents as well - bug minor
Feel free to create a PRs.
There are several types of tests:
- jest tests for plugins (quick)
- jest tests that start cypress and check results (long)
To run jest test with cypress start locally:
npm run test:jest:cy
Location | description |
---|---|
src |
all library code is here |
integration |
folder contains cypress tests for testing the library |
tests |
folder contains jest unit tests for testing the library |
reports |
directory that will be created after tests run with coverage info and reports |
.scripts |
helper scripts |
.github |
github actions workflows |
.husky |
pre-commit hooks (install by npm run husky:install ) |
Your library will contain only the code that located in this folder
Location | Description |
---|---|
src/index.ts |
export anything you want to be imported on user side from your library by '' that should run in browser |
src/cypress |
when you library contains additional commands put types for your commands inside types.ts file When using some other libraries in yours you can import its types within cypress.ts Note: this folder should have cypress name for easier types setup when you library is ready (this way you will not need to add your library in tsconfig.json types section) |
src/plugins |
when you library need to handle node events (register tasks or other things on node side) you can put it all here. Export all required methods within index.ts file. So when using library user imports will be '<your library name>/plugins' |
src/setup |
all functions that should be run in browser, export within index.ts |
src/utils |
some functions that can be run on both environments - node and DOM (browser), export within index.ts |
Location | description |
---|---|
integration/plugins |
use your plugins from src herets-preprocessor.ts is requiered to gather coverage info |
integration/support |
use your src/support, import it replacing src with cy-local to have correct code coverage |
integration/e2e |
tests folder, use anything from src , import it replacing src with cy-local to have correct code coverage |
Coverage is being gathered from cypress and from jest, after all tests finished execution with coverage.
It will be merged from both test packages.
To see individual coverage reports run:
npm run cov:jest
html report with coverage for jest testsnpm run cov:cy
html report with coverage for jest testsnpm run cov
html report with combined coverage
The package uses semantic versioning:
- To publish version with breaking change - use PR title with '[major]'
- To publish version with new features, no breaking changes change - use PR title with '[minor]'
- To publish version with defect fixes/packages updates - use PR title with '[patch]'
Latest version publishing is being done after merging PR into main
branch.
npm run publish:patch
- publish patchnpm run publish:minor
- publish minornpm run publish:major
- publish majornpm run publish:pack
- publish version specified in package.json script