diff --git a/cypress/e2e/Chat.Message.Notification.feature b/cypress/e2e/Chat.Message.Notification.feature index f4e0b3cc7..0ceafb352 100644 --- a/cypress/e2e/Chat.Message.Notification.feature +++ b/cypress/e2e/Chat.Message.Notification.feature @@ -12,7 +12,9 @@ Feature: Notifications for Chat Messages via E-Mail | Bob der Baumeister | bob-der-baumeister | moderator@example.org | 1234 | u2 | 0.0.4 | | Jenny Rostock | jenny-rostock | user@example.org | 1234 | u3 | 0.0.4 | | Nathan Narrator | nathan-narrator | narrator@example.org | abcd | u_nn | 0.0.4 | + | 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" Scenario: No Chat Notification Email when Online Given I am logged in as "bob-der-baumeister" diff --git a/cypress/support/step_definitions/common/{string}_blocks_{string}.js b/cypress/support/step_definitions/common/{string}_blocks_{string}.js new file mode 100644 index 000000000..2f2d24781 --- /dev/null +++ b/cypress/support/step_definitions/common/{string}_blocks_{string}.js @@ -0,0 +1,14 @@ +import { defineStep } from '@badeball/cypress-cucumber-preprocessor' +import '../../factories' + +defineStep('{string} blocks {string}', (blockerName, blockedName) => { + cy.neode() + .firstOf('User', { name: blockedName }) + .then(mutedUser => { + cy.neode() + .firstOf('User', { name: blockerName }) + .then(muterUser => { + cy.wrap(muterUser).relateTo(mutedUser, 'muted') + }) + }) +})