Skip to content
Snippets Groups Projects
Commit f344fb4a authored by jurgenhaas's avatar jurgenhaas
Browse files

amos/allianzapps/sites/azch#595 Add support for Cypress and Mailpit working together

parent b54c98b4
No related branches found
No related tags found
No related merge requests found
......@@ -118,3 +118,19 @@ Cypress.Commands.add('assertMailhogInbox', (callback) => {
callback(resp);
})
})
Cypress.Commands.add('emptyMailpitInbox', () => {
cy.request('DELETE', Cypress.env('mailpitUrl') + '/api/v1/messages').then((resp) => {
expect(resp.status).to.eq(200)
});
})
Cypress.Commands.add('assertMailpitInbox', (callback) => {
cy.request({
url: Cypress.env('mailpitUrl') + '/api/v1/messages',
accept: 'application/json'
}).then((resp) => {
expect(resp.status).to.eq(200);
callback(resp);
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment