CRDS Cypress tools
A package to help automated testing of crossroads.net with Cypress.io
This package is depricated!
The crds-cypress-tools
package is no longer supported, but never fear! Its functions have been moved to the following packages:
Installation
Install the following packages in your Cypress project:
npm install --save-dev crds-cypress-tools
Setup
This package provides different tools that can be selectively imported into your Cypress project. Each tool has its own setup instructions.
- Setting up authentication tools can be found here.
- Accessing Contentful functions can be found here.
Adding More Content
For convenience, references to tools can be added to index.js.
Examples
Some example tools have been provided. More detailed instructions can be found on Cypress's site here
a. To test out a plugin example, add the following to cypress/plugin/index.js
const cypressTools = require('crds-cypress-tools')
module.exports = (on, config) => {
cypressTools.initializePluginExample(on, config);
}
Then create a test and call:
cy.task('hello')
b. To test out a support example, add the following to cypress/support/commands.js
const cypressTools = require('crds-cypress-tools')
cypressTools.initializeSupportExample();
Then create a test and call:
cy.hello();