1.0.5 • Published 1 year ago

cypress-temp-sms v1.0.5

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

cypress-temp-sms

CircleCI

cypress-temp-sms āœ”

A lightweight npm library designed to generate temporary mobile numbers that shall be used for SMS verification as part of end-to-end testing with Cypress. It streamlines the process of testing OTP,2FA -related functionalities in your applications.

Thanks https://receive-smss.com/ šŸ™

Disclaimer:

āš ļø In this plugin, we are using https://receive-smss.com/ to generate temporary numbers and read its SMS inbox. Please note that these are several disposable numbers are to be used šŸ‘‰ only for testing activities šŸ‘ˆ

Features

  • Quick Setup: Easily integrate with your Cypress tests.
  • Disposable mobile numbers: Generate temporary mobile numbers for testing sign-ups, password resets, and more.

Installation

Install cypress-temp-sms using below command:

npm install cypress-temp-sms --save-dev

Usage

Add below line in your Cypress project - cypress/support/commands.js

import 'cypress-temp-sms'

Generate a new temporary number:

cy.getRandomNumber()  
//Returns you a temp number generated using https://receive-smss.com/

Generate a new temporary number with specific country:

cy.getNumberFrom('India')  
//Returns you a temp number generated using https://receive-smss.com/

Get the SMS inbox for the genrated number:

cy.getSMS('+123456789') 
//Returns below array object for the SMS inbox data. ( Last 40 Messages )
{ sender: string, message: any, received: string }[]

Contributing

Contributions are welcome!

#HappyTesting

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago