JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15132
  • Score
    100M100P100Q144475F
  • License ISC

Mobile testing helper for Cypress

Package Exports

  • cy-mobile-commands

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cy-mobile-commands) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Mobile testing helper for Cypress

Installing

Step 1, intall this package

npm install --save-dev cy-mobile-commands

Step 2, load it to your Cypress test context

Open cypress/support/index.js and add:

import 'cy-mobile-commands'

Step 3, ...

there is no more steps.

Commands

swipe

Syntax

.swipe(step1, step2[, step3[, ..., stepN]])

You can set two or more steps to make the swipe path as complex as you need.

Where step# can be:

  • [clientX, clientY]: a explicty position defined with number values.
  • left | right | top | bottom: a named position.

Usage example

cy.get('#my-page1').should('be.visible')
cy.get('#my-page2').should('not.be.visible')
cy.get('#my-slidable-book').swipe('right', 'left')
cy.get('#my-page1').should('not.be.visible')
cy.get('#my-page2').should('be.visible')