-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename file name to follow naming standard
- Loading branch information
1 parent
018ccd3
commit 326364a
Showing
13 changed files
with
445 additions
and
553 deletions.
There are no files selected for viewing
58 changes: 29 additions & 29 deletions
58
tests/behat/features/capabilities/comment/comments-hidden.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
@api | ||
Feature: Comments settings | ||
As a manager I want to hide comments | ||
on a topic | ||
so that users can't see the comment on the content | ||
As a manager I want to hide comments | ||
on a topic | ||
so that users can't see the comment on the content | ||
|
||
Scenario: I add a comment on a topic | ||
Given I am logged in as a user with the contentmanager role | ||
When I go to "/node/add/topic" | ||
And I fill in "Title" with "Topic with comments" | ||
And I fill in the "edit-body-0-value" WYSIWYG editor with "Topic description" | ||
And I check the box "News" | ||
And I press "Create topic" | ||
And I should see "Topic Topic with comments has been created." | ||
And I should see "Topic with comments" in the "Hero block" | ||
And I should see "Topic description" in the "Main content" | ||
And I fill in the following: | ||
| Add a comment | This is a test comment | | ||
And I press "Comment" | ||
Then I should see the success message "Your comment has been posted." | ||
And I should see the heading "Comments (1)" in the "Main content" | ||
And I should see "This is a test comment" in the "Main content" | ||
And I make a screenshot with the name "open comment" | ||
Scenario: I add a comment on a topic | ||
Given I am logged in as a user with the contentmanager role | ||
|
||
#Scenario: I hide comments on the topic | ||
When I am editing the topic "Topic with comments" | ||
Then I fill in "Title" with "Topic with hidden comments" | ||
And I click radio button "Hidden" | ||
And I press "Save" | ||
Then I should see "Topic Topic with hidden comments has been updated." | ||
And I should see "Topic with hidden comments" in the "Hero block" | ||
And I should not see "This is a test comment" in the "Main content" | ||
#And I make a screenshot with the name "hidden comment" | ||
When I go to "/node/add/topic" | ||
And I fill in "Title" with "Topic with comments" | ||
And I fill in the "edit-body-0-value" WYSIWYG editor with "Topic description" | ||
And I check the box "News" | ||
And I press "Create topic" | ||
And I should see "Topic Topic with comments has been created." | ||
And I should see "Topic with comments" in the "Hero block" | ||
And I should see "Topic description" in the "Main content" | ||
And I fill in the following: | ||
| Add a comment | This is a test comment | | ||
And I press "Comment" | ||
|
||
Then I should see the success message "Your comment has been posted." | ||
And I should see the heading "Comments (1)" in the "Main content" | ||
And I should see "This is a test comment" in the "Main content" | ||
|
||
# Scenario: I hide comments on the topic | ||
And I am editing the topic "Topic with comments" | ||
And I fill in "Title" with "Topic with hidden comments" | ||
And I click radio button "Hidden" | ||
And I press "Save" | ||
And I should see "Topic Topic with hidden comments has been updated." | ||
And I should see "Topic with hidden comments" in the "Hero block" | ||
And I should not see "This is a test comment" in the "Main content" |
73 changes: 73 additions & 0 deletions
73
tests/behat/features/capabilities/event/event-visibility-an-cm.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@api | ||
Feature: Validate access and visibility of events for Anonymous user and content manager | ||
|
||
Background: | ||
Given I enable the module "social_group_flexible_group" | ||
And events with non-anonymous author: | ||
| title | body | field_event_date | field_event_date_end | field_content_visibility | | ||
| Public event | Body description text. | 2035-01-01T11:00:00 | 2035-01-02T18:00:00 | public | | ||
| Community event | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | community | | ||
#Create event with different visibility in a flexible group | ||
And groups with non-anonymous owner: | ||
| label | field_group_description | field_flexible_group_visibility | field_group_allowed_visibility |type | | ||
| Flexible group for event| Description of Flexible group | public | public,community,group |flexible_group | | ||
And events with non-anonymous author: | ||
| title | body | field_event_date | field_event_date_end | group | field_content_visibility | | ||
| Public event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-02T18:00:00 | Flexible group for event | public | | ||
| Community event in group| Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | Flexible group for event | community | | ||
| Secret event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | Flexible group for event | group | | ||
|
||
Scenario: Anonymous user should only see public events | ||
Given I am an anonymous user | ||
|
||
When I am on "/community-events" | ||
|
||
Then I should see "Public event" | ||
And I should not see "Community event" | ||
And I should see "Public event in group" | ||
And I should not see "Community event in group" | ||
And I should not see "Secret event in group" | ||
|
||
And I open the "event" node with title "Public event" | ||
And I should see "Public event" | ||
|
||
And I open the "event" node with title "Public event in group" | ||
And I should see "Public event in group" | ||
|
||
And I open the "event" node with title "Community event" | ||
And I should not see "Community event" | ||
And I should see "Access denied" | ||
|
||
And I open the "event" node with title "Community event in group" | ||
And I should not see "Community event in group" | ||
And I should see "Access denied" | ||
|
||
And I open the "event" node with title "Secret event in group" | ||
And I should not see "Secret event in group" | ||
And I should see "Access denied" | ||
|
||
Scenario: Content manager should see all events | ||
Given I am logged in as a user with the contentmanager role | ||
|
||
When I am on "/community-events" | ||
|
||
Then I should see "Public event" | ||
And I should see "Community event" | ||
And I should see "Public event in group" | ||
And I should see "Community event in group" | ||
And I should see "Secret event in group" | ||
|
||
And I open the "event" node with title "Public event" | ||
And I should see "Public event" | ||
|
||
And I open the "event" node with title "Public event in group" | ||
And I should see "Public event in group" | ||
|
||
And I open the "event" node with title "Community event" | ||
And I should see "Community event" | ||
|
||
And I open the "event" node with title "Community event in group" | ||
And I should see "Community event in group" | ||
|
||
And I open the "event" node with title "Secret event in group" | ||
And I should see "Secret event in group" |
50 changes: 50 additions & 0 deletions
50
tests/behat/features/capabilities/event/event-visibility-au.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@api | ||
Feature: Validate access and visibility of events for Authenticated User (AU) | ||
|
||
Background: | ||
Given events with non-anonymous author: | ||
| title | body | field_event_date | field_event_date_end | field_content_visibility | | ||
| Public event | Body description text. | 2035-01-01T11:00:00 | 2035-01-02T18:00:00 | public | | ||
| Community event | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | community | | ||
And I enable the module "social_group_flexible_group" | ||
And groups with non-anonymous owner: | ||
| label | field_group_description | field_flexible_group_visibility | field_group_allowed_visibility |type | | ||
| Flexible group for event | Description of Flexible group | public | public,community,group |flexible_group | | ||
And events with non-anonymous author: | ||
| title | body | field_event_date | field_event_date_end | group | field_content_visibility | | ||
| Public event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-02T18:00:00 | Flexible group for event | public | | ||
| Community event in group| Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | Flexible group for event | community | | ||
|Secret event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | Flexible group for event | group | | ||
|
||
Scenario: Unverified user should only see public events | ||
Given I disable that the registered users to be verified immediately | ||
And I am logged in as an "authenticated user" | ||
|
||
When I am on "/community-events" | ||
|
||
Then I should see "Public event" | ||
And I should not see "Community event" | ||
And I should see "Public event in group" | ||
And I should not see "Community event in group" | ||
And I should not see "Secret event in group" | ||
|
||
And I open the "event" node with title "Public event" | ||
And I should see "Public event" | ||
|
||
And I open the "event" node with title "Public event in group" | ||
And I should see "Public event in group" | ||
|
||
And I open the "event" node with title "Community event" | ||
And I should not see "Community event" | ||
And I should see "Access denied" | ||
And I should see "You are not authorized to access this page." | ||
|
||
And I open the "event" node with title "Community event in group" | ||
And I should not see "Community event in group" | ||
And I should see "Access denied" | ||
And I should see "You are not authorized to access this page." | ||
|
||
And I open the "event" node with title "Secret event in group" | ||
And I should not see "Secret event in group" | ||
And I should see "Access denied" | ||
And I should see "You are not authorized to access this page." |
85 changes: 85 additions & 0 deletions
85
tests/behat/features/capabilities/event/event-visibility-vu.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
@api | ||
Feature: Validate access and visibility of events for Verified User (VU) | ||
|
||
Background: | ||
Given I enable the module "social_group_flexible_group" | ||
And events with non-anonymous author: | ||
| title | body | field_event_date | field_event_date_end | field_content_visibility | | ||
| Public event | Body description text. | 2035-01-01T11:00:00 | 2035-01-02T18:00:00 | public | | ||
| Community event | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | community | | ||
And groups with non-anonymous owner: | ||
| label | field_group_description | field_flexible_group_visibility | field_group_allowed_visibility |type | | ||
| Flexible group for event | Description of Flexible group | public | public,community,group |flexible_group | | ||
And events with non-anonymous author: | ||
| title | body | field_event_date | field_event_date_end | group | field_content_visibility | | ||
| Public event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-02T18:00:00 | Flexible group for event | public | | ||
| Community event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | Flexible group for event | community | | ||
|Secret event in group | Body description text. | 2035-01-01T11:00:00 | 2035-01-01T18:00:00 | Flexible group for event | group | | ||
And users: | ||
| name | mail | status | | ||
| Group Member | group_member@example.com | 1 | | ||
#Add a user to the group | ||
And I am logged in as a user with the sitemanager role | ||
And I am on "/all-groups" | ||
And I click "Flexible group for event" | ||
And I click "Manage members" | ||
And I click the group member dropdown | ||
And I click "Add directly" | ||
And I fill in select2 input ".form-type-select" with "Group Member" and select "Group Member" | ||
And I wait for AJAX to finish | ||
And I press "Save" | ||
And I should see "1 new member joined the group." | ||
|
||
Scenario: Verified user should see public and community events | ||
Given I am logged in as a user with the verified role | ||
|
||
When I am on "/community-events" | ||
|
||
Then I should see "Public event" | ||
And I should see "Community event" | ||
And I should see "Public event in group" | ||
And I should see "Community event in group" | ||
And I should not see "Secret event in group" | ||
|
||
And I open the "event" node with title "Public event" | ||
And I should see "Public event" | ||
|
||
And I open the "event" node with title "Public event in group" | ||
And I should see "Public event in group" | ||
|
||
And I open the "event" node with title "Community event" | ||
And I should see "Community event" | ||
|
||
And I open the "event" node with title "Community event in group" | ||
And I should see "Community event in group" | ||
|
||
And I open the "event" node with title "Secret event in group" | ||
And I should not see "Secret event in group" | ||
And I should see "Access denied" | ||
And I should see "You are not authorized to access this page." | ||
|
||
Scenario: Verified user group member should see all events of the group | ||
Given I am logged in as "Group Member" | ||
|
||
When I am on "/community-events" | ||
|
||
Then I should see "Public event" | ||
And I should see "Community event" | ||
And I should see "Public event in group" | ||
And I should see "Community event in group" | ||
And I should see "Secret event in group" | ||
|
||
And I open the "event" node with title "Public event" | ||
And I should see "Public event" | ||
|
||
And I open the "event" node with title "Public event in group" | ||
And I should see "Public event in group" | ||
|
||
And I open the "event" node with title "Community event" | ||
And I should see "Community event" | ||
|
||
And I open the "event" node with title "Community event in group" | ||
And I should see "Community event in group" | ||
|
||
And I open the "event" node with title "Secret event in group" | ||
And I should see "Secret event in group" |
95 changes: 0 additions & 95 deletions
95
tests/behat/features/capabilities/event/event-visibility_AN_CM.feature
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.