Skip to content

Commit

Permalink
MDL-65965 availability: Behat test for activity grouping restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jun 21, 2019
1 parent f1a8db6 commit f512a66
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,25 @@ Feature: availability_grouping
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"
And I should not see "P2" in the "region-main" "region"

@javascript
Scenario: Check grouping access restriction message on course homepage
Given the following "groupings" exist:
| name | course | idnumber |
| Grouping A | C1 | GA |
And the following "grouping groups" exist:
| grouping | group |
| GA | GI1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | grouping |
| assign | Test assign | Assign description | C1 | assign1 | 1 | GA |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I turn editing mode on
And I open "Test assign" actions menu
And I choose "Edit settings" in the open action menu
And I expand all fieldsets
And the field "groupingid" matches value "Grouping A"
And I press "Add group/grouping access restriction"
When I press "Save and return to course"
Then I should see "Not available unless: You belong to a group in Grouping A"

0 comments on commit f512a66

Please sign in to comment.