Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-fill-command

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-fill-command

A Cypress command for fill inputs

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33K
increased by26.63%
Maintainers
1
Weekly downloads
 
Created
Source

cypress-fill-command

All Contributors

GitHub license Travis Status npm version

A fill command that fills inputs faster than the cypress native type command.

This package adds a custom Cypress command that fills inputs, textareas and content editable elements. The type command from cypress has 10ms delay, so it slows the tests a bit. This command doesn't have any delay at all.

Table of Contents

Installation

The package is distributed via npm and should be installed as one of your project's devDependencies:

npm install --save-dev cypress-fill-command

or

yarn add cypress-fill-command --dev

Usage

cypress-fill-command extends Cypress' cy command. Add this line to your project's cypress/support/commands.js:

import 'cypress-fill-command'

Now you are ready to use the command. Here is a basic example:

cy.get('#the-element-id').fill('Some text')

API

Exposed command in a nutshell:

cySubject.fill(text, options)
  • {String} text – The text to be filled into an input

Options contains following properties:

  • {boolean} overwrite - To overwrite the input value. Defaults to true
  • {boolean} prepend - To insert before (true) or after (false) the current input value when overwrite is false. Defaults to false

It isn't working!

It has been used on a React project with inputs controlled by React state.

I cannot guarantee it will work in any custom input, but we can try to improve it, just open an issue or a PR.

Contributors

Thanks goes to these wonderful people (emoji key):


Steven Dorries

🤔 ⚠️ 💻

Nathan Jones

💻

André Muta

🤔

Daniel Ferrari

🚇 📖 ⚠️ 💻 👀

Dan Caseley

🤔 ⚠️ 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

Keywords

FAQs

Package last updated on 05 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc