A set of functions to help you interact with Ionic Framework elements in your Cypress tests
npm install @saninn/cypress-ionic<= 7 -> 0.x.x
>= 8 -> 1.x.x
npm install @saninn/cypress-ionic --save-dev.
json
{
"$schema": "https://on.cypress.io/cypress.schema.json",
"includeShadowDom": true,
...
}
`
\\ Although it is not needed, it is recommended to disable Ionic animations when possible. That said, this library let the animations active so timing issues are handled.
Basic usage
Each helper function returns an Cypress.Chainable object with the component that was changed. So an example of usage could be
`ts
import { ionRangeCypress } from '@saninn/cypress';
it('can be changed by set value', () => {
ionRangeCypress.setValue('ion-range.my-ion-range', 42);
cy.get('my-view-item').should('eq', '42');
});
`
API and Documentation
See the generated documentation here
License
AGPLv3
Development
Each exported function is directly tested on Cypress.
Call npm run develop to start a simple server and open cypress.
You can see the served host on http://localhost:3999` with: