cypress-webhookdotsite
v1.0.8
Published
cypress npm extension to allow for email and webhook testing through webhook.site
Downloads
14
Maintainers
Readme
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}`);
});
});
});