Skip to content

vladlearns/cy-scrollToBy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@vladlearns/cy-scrolltoby

Cypress custom command "cy.scrollToBy" for iterative scrolling in e2e tests.

Examples

cy.scrollToBy();
cy.scrollToBy({ direction : "bottom", frequency : 200, interval : 30, timeout : 50000 });

Install

npm install --save-dev @vladlearns/cy-scrolltoby

Add the following line to your Cypress support file

// usually cypress/support/index.js
import '@vladlearns/cy-scrolltoby/support'

This will add a new command cy.scrollToBy for scrolling.

TypeScript

The definition for cy.scrollToBy command is in index.d.ts file. If you are using JavaScript, include the following line in our spec files

// cypress/integration/my-spec.js
/// <reference types="@vladlearns/cy-scrolltoby" />

With this line, you should have Intelligent Code Completion working in most IDEs and the TypeScript compiler should understand the cy.scrollToBy command.

About

Cypress custom command "cy.scrollToBy" for iterative scrolling in e2e tests. Scroll to a place on the page by some distance

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published