4tolexx

notification profile creation feature test

Oct 7th, 2025
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. Feature: Create Notification Profile
  2.  
  3. Background:
  4. Given a role "Authorized" with permissions:
  5. | NotificationProfile | read, create |
  6. | EmailTemplate | read |
  7. | User | read |
  8. | Role | read |
  9. And a user "authorized.user" with role "Authorized"
  10. And a user "other.user" with:
  11. | name | Udo Unathorized |
  12. | email | [email protected] |
  13. And an email template "Test Template" with:
  14. """
  15. This is an email template:
  16.  
  17. {{notifications.first.resource.subject_id}}
  18.  
  19. of Center and Study
  20.  
  21. {{notifications.first.resource.center.code}}
  22.  
  23. {{notifications.first.resource.center.study.name}}
  24. """
  25.  
  26. Scenario: Notification for `User` triggering resource
  27. When I sign in as user "authorized.user"
  28. And I browse to new NotificationProfile form
  29. And I fill in "Title" with "Test Notification Profile"
  30. And I fill in "Description" with "New notification profile for user"
  31. And I check "Is enabled"
  32. And I select "create" from "Triggering actions"
  33. And I select "User" from "Triggering resource"
  34. And I select "Include triggering user" from "Filter triggering user"
  35. And I select "instantly" from "Maximum email throttling delay"
  36. And I select "Test Template" from "Email template"
  37. And I click button "Create Notification profile"
  38. Then I see "Notification profile was successfully created"
  39. And I debug
  40. # And I wait 20 seconds
  41. # When a notification email is configured for profile "Test Notification Profile"
  42. # And I click "Logout" in the navigation menu
  43. # And I sign in as user "other.user"
  44. # Then an e-mail is sent to "[email protected]" with subject "New profile form"
  45.  
Advertisement
Add Comment
Please, Sign In to add comment