Nervous Penpal Message

    cy-mobile-commands
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.1 • Public • Published

    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')

    Install

    npm i cy-mobile-commands@0.0.1

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    3.71 kB

    Total Files

    3

    Last publish

    Collaborators

    • aurium