Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@knapsack-pro/cypress) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@knapsack-pro/cypress
@knapsack-pro/cypress runs your E2E tests with Cypress.io test runner and does dynamic tests allocation across parallel CI nodes using KnapsackPro.com Queue Mode to provide the fastest CI build time (optimal test suite timing).
Learn about Knapsack Pro Queue Mode in the video how to run tests with dynamic test suite split and learn what CI problems can be solved thanks to it.
Read article about runnning javascript E2E tests faster with Cypress on parallel CI nodes.
Table of Contents
Installation
See the docs to get started.
FAQ
This project depends on
@knapsack-pro/core. Please check the FAQ for@knapsack-pro/coreto learn more about core features available to you.
Development
Requirements
You can use NVM to manage Node version in development.
>= Node 18.13.0 LTS
Dependencies
Setup
- Setup @knapsack-pro/core project.
Follow below steps or use bin/setup_development script to take care of steps 2-5.
Install dependencies:
$ npm install $(npm bin)/cypress installIn order to use local version of
@knapsack-pro/corerun:$ npm link @knapsack-pro/coreCompile TypeScript code to
libdirectory by running:$ npm startRegister
@knapsack-pro/cypresspackage globally in your local system. This way we will be able to develop other npm packages dependent on it:$ npm linkSet up your IDE:
Visual Studio Code
Install the following plugins:
Go to
File > Preferences > Settings > Text Editor > FormattingTurn on
Format On Savecheckbox.
From now on, every change in code base will be automatically formatted by Prettier. ESLint shows errors and warnings in VSCode.
Write some code.
Publishing
Sign in to npm registry with command:
$ npm adduserEnsure you have the latest version of
@knapsack-pro/coreinpackage.json:{ "dependencies": { "@knapsack-pro/core": "^x.x.x" } }Then run
npm install. This way you will be able to test@knapsack-pro/coreinstalled from npm registry instead of local one that was linked withnpm link @knapsack-pro/core.Now commit updated
package.jsonandpackage-lock.json.$ git commit -am "Update @knapsack-pro/core"Before releasing a new version of package please update
CHANGELOG.mdwith github_changelog_generator:$ gem install github_changelog_generator # generate CHANGELOG.md $ github_changelog_generator --user KnapsackPro --project knapsack-pro-cypress $ git commit -am "Update CHANGELOG.md" $ git push origin masterIf you have added new files to the repository and they should be part of the released npm package then please ensure they are included in
filesarray inpackage.json.If you have changed any headers in
README.mdplease refresh table of contents with:$ npm run doctocCompile project:
# ensure you use local version of @knapsack-pro/core $ npm link @knapsack-pro/core $ npm run buildIn order to bump version of the package run below command. It will also create a version commit and tag for the release:
# bump patch version 0.0.x $ npm version patch # bump minor version 0.x.0 $ npm version minorPush to git repository created commit and tag:
$ git push origin master --tagsNow when git tag is on Github you can update
CHANGELOG.mdagain.$ github_changelog_generator --user KnapsackPro --project knapsack-pro-cypress $ git commit -am "Update CHANGELOG.md" $ git push origin masterNow you can publish package to npm registry:
$ npm publishUpdate the latest available library version in
TestSuiteClientVersionCheckerfor the Knapsack Pro API repository.
Testing
CI
If your feature requires code change in @knapsack-pro/core then please push the @knapsack-pro/core to GitHub first. Then you can push changes for @knapsack-pro/cypress to ensure the CI will use the latest @knapsack-pro/core.
Example Cypress test suite
To test @knapsack-pro/cypress against real test suite we use forked cypress-example-kitchensink project.