Helpers for interacting with Ant Design components in Cypress tests.
Import the provided helpers directly:
import { getButton, shouldHaveTooltip } from '@hon2a/cypress-antd'
// note that "child command" (Cypress terminology) helpers are curried to be used inside `then`
getButton('Cool Button').then(shouldHaveTooltip('The coolness of this button knows no bounds.'))
or register them automatically with Cypress as custom commands:
import '@hon2a/cypress-antd/lib/register'
// note that "child commands" are registered properly to automatically consume the yielded subject
cy.getButton('Uncool Button').shouldHaveTooltip('This button is so very sad.')
Documentation of individual commands is TBD. For now, the helper names and contracts should be self-explanatory.
Install dependencies using:
npm install
After you modify sources, run the following (or set up your IDE to do it for you):
npm run format
npm run lint
npm test
and fix the errors, if there are any.
Publishing is done in two steps:
npm version <patch|minor|major>
git push --follow-tags
npm publish --access public