UNPKG

@seriesfi/cypress-courier

Version:

A Cypress plugin for handling email testing with Courier

17 lines 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Cypress.Commands.add('getMessageContent', (messageId) => { const { courierAuthToken } = Cypress.env(); const options = { url: `https://api.courier.com/messages/${messageId}/output`, method: 'GET', auth: { bearer: courierAuthToken }, }; cy.request(options).then((response) => { expect(response.status).to.eq(200); return response.body; }); }); //# sourceMappingURL=getMessageContent.js.map