plugins/organization_ratings/features/rate_community.feature
Feature: rate_community
As a user
I want to be able rate a community
So that users can see my feedback about that community
Background:
Given plugin "OrganizationRatings" is enabled on environment
Given the following user
| login | name |
| joaosilva | Joao Silva |
And the following community
| identifier | name |
| mycommunity | My Community |
And the following blocks
| owner | type |
| mycommunity | AverageRatingBlock |
| mycommunity | OrganizationRatingsBlock |
And the environment domain is "localhost"
And I am logged in as "joaosilva"
Scenario: display rate button and total ratings inside average block
Given I am on mycommunity's homepage
Then I should see "Rate this Community" within ".average-rating-block"
And I should see "Be the first to rate" within ".average-rating-block"
Scenario: display rate button inside communities ratings block
Given I am on mycommunity's homepage
Then I should see "Rate Community" within ".make-report-block"
Scenario: redirect to profile page
Given I am on mycommunity's homepage
When I follow "Rate this Community"
Then I should see "Joao Silva" within ".star-profile-name"
And I should see Joao Silva's profile image
Scenario: display total ratings inside average block
Given I am on mycommunity's homepage
When I follow "Rate this Community"
Then I follow "Save"
Then I should see "(1)" within ".total-ratings"