diff --git a/cypress/e2e/Chat.Message.Notification.feature b/cypress/e2e/Chat.Message.Notification.feature index c26e5e1e1..7bbbeca3f 100644 --- a/cypress/e2e/Chat.Message.Notification.feature +++ b/cypress/e2e/Chat.Message.Notification.feature @@ -16,6 +16,7 @@ Feature: Notifications for Chat Messages via E-Mail | Billy Block | billy-block | billy@example.org | 4321 | u_bb | 0.0.4 | And "Bob der Baumeister" mutes "Nathan Narrator" And "Bob der Baumeister" blocks "Billy Block" + And the mailserver inbox is empty Scenario: Receive Chat Notification Email only when Online When "Jenny Rostock" sends a chat message to "Bob der Baumeister" diff --git a/cypress/support/step_definitions/email.js b/cypress/support/step_definitions/email.js index 0beaab73b..a0e51e22a 100644 --- a/cypress/support/step_definitions/email.js +++ b/cypress/support/step_definitions/email.js @@ -2,6 +2,13 @@ import { defineStep } from '@badeball/cypress-cucumber-preprocessor' const emailClientList = '.email-list' + +defineStep('the mailserver inbox is empty', () => { + cy.request('DELETE', 'localhost:1080/email/all') + .its('status') + .should('equal', 200) +}) + defineStep('{string} should receive no chat notification email', (recipientEmailAddress) => { const emailTitle = 'Neue Chat-Nachricht | New chat message'