1.0.8 • Published 2 years ago

cypress-webhookdotsite v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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}`);
    });
  });
});
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago