custom-cypress-commands
v0.0.5
Published
Generic commands to shorten the syntax used in cypress tests
Downloads
4
Maintainers
Readme
custom-cypress-commands
A repo containing many different commands that make writing cypress easier
✨ Installation
npm install cypress-custom-commands
In your support/index.js
Import this to your index.js to bring in all generic reusable commands
import 'custom-cypress-commands';
In your test file
Import this into your test file to make use of custom commands in the package
import { customFunctions } from 'custom-cypress-commands';
💻 Usage
test.spec.js
import { customFunctions } from 'custom-cypress-commands';
describe('Example test', () => {
it('Check the wording in the main heading', () => {
customFunctions.checkWordingIncludes('#mainHeading', 'Welcome');
});
});