Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wisersolutions/cypress-antd
Helpers for interacting with Ant Design components in Cypress tests.
https://github.com/wisersolutions/cypress-antd
cypress innersource test-automation
Last synced: about 1 month ago
JSON representation
Helpers for interacting with Ant Design components in Cypress tests.
- Host: GitHub
- URL: https://github.com/wisersolutions/cypress-antd
- Owner: WiserSolutions
- License: mit
- Created: 2019-07-01T11:37:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:16:56.000Z (over 1 year ago)
- Last Synced: 2024-08-08T20:40:34.617Z (5 months ago)
- Topics: cypress, innersource, test-automation
- Language: JavaScript
- Homepage:
- Size: 981 KB
- Stars: 30
- Watchers: 3
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cypress-antd
Helpers for interacting with Ant Design components in Cypress tests.
## Use
Import the provided helpers directly:
```javascript
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:
```javascript
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._
## Development
### Install
Install dependencies using:
```sh
npm install
```### Develop
After you modify sources, run the following (or set up your IDE to do it for you):
- format the code using `npm run format`
- lint it using `npm run lint`
- test it using `npm test`and fix the errors, if there are any.
### Publish
Publishing is done in two steps:
1. Create a new version tag and push it to the repository:
```sh
npm version
git push --follow-tags
```
1. Build and publish the new version as a npm package:
```sh
npm publish --access public
```