Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. Feature: MyEngageNY: Community Content
  2.  
  3. Background:
  4. Given users:
  5. | name | mail | status | roles |
  6. | group_owner | group_owner@test.com | 1 | local test user |
  7. | non_member | non_member@test.com | 1 | local test user |
  8. | member_user | member@test.com | 1 | local test user |
  9. | moderator | moderator@test.com | 1 | local test user |
  10. | contentadmin| contentadmin@test.com | 1 | local test user, content administrator |
  11.  
  12. @api
  13. Scenario: Admin Discussion Editing.
  14. NYS_EDP-BUG-2424
  15. System Admin is Editing a Discussion/Resource/Announcement in Community
  16. Field doesn't keep the default value of the same Community
  17.  
  18. (Only happens as an admin editing a node in a group which you are not a member.)
  19.  
  20. # Create a community as a normal user
  21. Given I am logged in as a user with the "local test user" role
  22. Then I start a "public" community called "Content Edit Bug Community"
  23.  
  24. # Visit that community as an admin
  25. Then I am logged in as a user with the "content administrator" role
  26. When I visit the community "Content Edit Bug Community"
  27.  
  28. # Post a discussion in this community
  29. Then I fill in "body[und][0][value]" with "This is not my community"
  30. And I press "Post"
  31. Then I should see "This is not my community" in the ".teaser" element
  32.  
  33. # Attempt to edit the discussion
  34. When I click "Edit"
  35.  
  36. # Validate the correct default value for community field.
  37. Then the select list "edit-og-group-ref-und-0-default" should be set to "Content Edit Bug Community"
  38.  
  39. @api
  40. Scenario: Try to post empty content and an empty comment.
  41. NYS_EDP-BUG-3388
  42. NYS_EDP-BUG-3389
  43. Does not validate blank space for the resource comments and creates one with empty comments
  44. Given I am logged in as a user with the "local test user" role
  45. When I start a "public" community called "Content Edit Bug Community"
  46. Then I fill in "body[und][0][value]" with ""
  47. And I press "Post"
  48. Then I should see "Discussion field is required"
  49. Then I fill in "body[und][0][value]" with "Hello World"
  50. And I press "Post"
  51. Then I should see "The discussion has been added."
  52. When I fill in "comment_body[und][0][value]" with "<span><p> </p></span>"
  53. And I press "Reply"
  54. Then I should see "Empty values are not allowed!"
  55.  
  56. When I fill in "comment_body[und][0][value]" with "Comment Content"
  57. And I press "Reply"
  58. Then I should see "Comment Content"
  59.  
  60. @api
  61. Scenario Outline: I can create content for my communities with proper visibility.
  62. Given I am logged in as "group_owner"
  63. And I start a "<type>" community called "<name>"
  64. When I visit the community "<name>"
  65. And I fill in "edit-body-und-0-value" with "<discussion text>"
  66. And I press "Post"
  67. Then I should see "The discussion has been added."
  68. And I should not see "The discussion has been updated."
  69. Then I should see "<discussion text>"
  70.  
  71. # Logged in users should be able to find public content on the community page
  72. Given I am logged in as "non_member"
  73. When I visit the community "<name>"
  74. Then I <visibility> see "<discussion text>"
  75.  
  76. # Logged in users should be able to find public content in search results
  77. When I search for "<discussion text>"
  78. Then the "h3" element <visibility> contain "<discussion text>"
  79.  
  80. # Content admin users should always be able to find public and private content on the community page
  81. # and in the search results.
  82. Given I am logged in as "contentadmin"
  83. When I visit the community "<name>"
  84. Then I should see "<discussion text>"
  85. When I search for "<discussion text>"
  86. Then the "h3" element should contain "<discussion text>"
  87.  
  88. # Anonymous users should never be able to find community content in search results
  89. Given I am an anonymous user
  90. When I search for "<discussion text>"
  91. Then the "h3" element should not contain "<discussion text>"
  92.  
  93. Examples:
  94. | type | name | discussion text | visibility |
  95. | public | My Test Community | Public Discussion (public) | should |
  96. | invite | My Test Invite Community | Public Discussion (invite) | should |
  97. | private | My Test Private Community | Private Discussion (private) | should not |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement