e2e: add post follow notification feature file

This commit is contained in:
mahula 2025-04-16 22:34:42 +02:00
parent ab0de788b3
commit f11c2cbadf

View File

@ -0,0 +1,44 @@
Feature: Notifications Posts
As a user
I want to observe a post
In order to get notified about new comments on a post
When absent or offline I get notified via e-mail
# For users I have blocked or muted no notifications or emails are send
Background:
Given the following "users" are in the database:
| name | slug | email | password | id | termsAndConditionsAgreedVersion |
| 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 the following "posts" are in the database:
| id | title | slug | authorId |
| nicePost | The nice Post | nice-post | jenny-rostock |
# | funnyPost | The funny Post | funny-post | nathan-narrator |
# And "Bob der Baumeister" mutes "Nathan Narrator"
# And "Bob der Baumeister" blocks "Billy Block"
Scenario: Receive notifications regarding observed Post
Given "Bob der Baumeister" observes the post "nicePost"
When "Nathan Narrator" comments on the post "nicePost"
Then "moderator@example.org" receives an email regarding "The nice Post"
When I am logged in as "Bob der Baumeister"
Then a notification about the new post is displayed in the nav menu
# TODO: omit hese scenario as the different ways into observin /unobserving apost shouldbecovered in unit testing
# Scenario: Unfollow a post and receive no more notifications about it
# Given I follow a post
# And I am on the page of the post
# When I click the unfollow button
# Then the post is explicitly unfollowed in the database
# Scenario: Follow authored posts by default get notified
# When I write a post
# Then I follow the post by default
# Scenario: Follow commented posts by default get notified
# When I write a comment to a post
# Then I follow the post by default