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

Add Mailhog commands

Update Cypress to 12.3.0
parent e6e61d5b
No related branches found
No related tags found
No related merge requests found
Pipeline #747363 passed
variables:
VERSION: ${CI_COMMIT_TAG}
CYPRESS_VERSION: 11.2.0
CYPRESS_VERSION: 12.3.0
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
......
......@@ -102,3 +102,19 @@ Cypress.Commands.add('assertFieldCondition', (data) => {
}
}
})
Cypress.Commands.add('emptyMailhogInbox', () => {
cy.request('DELETE', Cypress.env('mailhogUrl') + '/api/v1/messages').then((resp) => {
expect(resp.status).to.eq(200)
});
})
Cypress.Commands.add('assertMailhogInbox', (callback) => {
cy.request({
url: Cypress.env('mailhogUrl') + '/api/v2/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