cypress-webhookdotsite
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Node.js Package

NPM

cypress-webhookdotsite

cypress npm extension to allow for email and webhook testing through webhook.site

What is it?

Webhook.site is a developer tool that provides email and webhook testing. This is a third party library and I have no affiliation to webhook.site or any of its partners.

Installation

npm install cypress-webhookdotsite --save-dev

Once downloaded, add the following line to cypress/support/index.js to import the commands into your Cypress project:

require('cypress-webhookdotsite');

Example Usage

cy.webhookGenerateToken({
  apikey: 'ff07eb99-ed12-4f55-8fa1-65c7567d41b9',
  password: 'Password1234',
}).then((token) => {
  cy.log(`Token: ${token}`);
  cy.webhookGetEmailAddress({
    token: token,
    apikey: 'ff07eb99-ed12-4f55-8fa1-65c7567d41b9',
    password: 'Password1234',
  }).then((emailAddress) => {
    console.log(emailAddress);
    cy.log(`Email Address: ${emailAddress}`);
  });
  cy.webhookGetURI({
    token: token,
    apikey: 'ff07eb99-ed12-4f55-8fa1-65c7567d41b9',
    password: 'Password1234',
  }).then((webHookURI) => {
    console.log(webHookURI);
    cy.log(`WebHook URI: ${webHookURI}`);
    cy.request(webHookURI);
  });
  cy.webhookGetAllRequests({
    token: token,
    apikey: 'ff07eb99-ed12-4f55-8fa1-65c7567d41b9',
    password: 'Password1234',
  }).then((responses) => {
    console.log(responses);
    responses.forEach((response) => {
      cy.log(`Response: ${response.ip}`);
    });
  });
});

Package Sidebar

Install

npm i cypress-webhookdotsite

Weekly Downloads

3

Version

1.0.8

License

MIT

Unpacked Size

8.84 kB

Total Files

8

Last publish

Collaborators

  • ghostbackwards