MDL-69231 behat: remaining work for role capability generator
This commit does few things: * Unify data generators usage to role short name. * Replace remaining manual steps to use the new data generator. * Also replaced other manual steps to set config to use data generators. * Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines. * Fixes tests to have one Given/When/Then per scenario.
This commit is contained in:
@@ -59,8 +59,8 @@ Feature: Anonymous feedback
|
||||
@javascript
|
||||
Scenario: Complete anonymous feedback and view analysis on the front page as an authenticated user
|
||||
Given the following "role capability" exists:
|
||||
| role | Authenticated user on frontpage |
|
||||
| mod/feedback:viewanalysepage | Allow |
|
||||
| role | frontpage |
|
||||
| mod/feedback:viewanalysepage | allow |
|
||||
And I log in as "user1"
|
||||
And I am on site homepage
|
||||
When I follow "Site feedback"
|
||||
@@ -117,8 +117,8 @@ Feature: Anonymous feedback
|
||||
Given the following config values are set as admin:
|
||||
| feedback_allowfullanonymous | 1 |
|
||||
And the following "role capability" exists:
|
||||
| role | Guest |
|
||||
| mod/feedback:viewanalysepage | Allow |
|
||||
| role | guest |
|
||||
| mod/feedback:viewanalysepage | allow |
|
||||
When I follow "Site feedback"
|
||||
And I should not see "Preview questions"
|
||||
And I follow "Answer the questions"
|
||||
|
||||
@@ -55,8 +55,8 @@ Feature: Non anonymous feedback
|
||||
@javascript
|
||||
Scenario: Complete non anonymous feedback and view analysis on the front page as an authenticated user
|
||||
Given the following "role capability" exists:
|
||||
| role | Authenticated user on frontpage |
|
||||
| mod/feedback:viewanalysepage | Allow |
|
||||
| role | frontpage |
|
||||
| mod/feedback:viewanalysepage | allow |
|
||||
When I am on the "Site feedback" "feedback activity" page logged in as user1
|
||||
And I follow "Answer the questions"
|
||||
And I should see "Do you like our site?"
|
||||
|
||||
Reference in New Issue
Block a user