MDL-65958 calendar: cover students default event type visibility

This commit is contained in:
Simey Lameze
2019-07-03 20:39:58 +08:00
parent 26d6404315
commit da6ed25999
+22
View File
@@ -216,3 +216,25 @@ Feature: Perform basic calendar functionality
And I should see "Course 2" in the ".form-autocomplete-suggestions" "css_element"
And I should see "Course 3" in the ".form-autocomplete-suggestions" "css_element"
@javascript
Scenario: Students can only see user event type by default.
Given I log in as "student1"
And I am viewing site calendar
When I click on "New event" "button"
Then I should see "User" in the "div#fitem_id_staticeventtype" "css_element"
And I am on "Course 1" course homepage
And I follow "This month"
When I click on "New event" "button"
Then I should see "User" in the "div#fitem_id_staticeventtype" "css_element"
And I click on "Close" "button"
And I log out
Given I log in as "admin"
And I navigate to "Appearance > Calendar" in site administration
And I set the field "Admins see all" to "1"
And I press "Save changes"
And I log out
Given I log in as "student1"
And I am on "Course 1" course homepage
And I follow "This month"
When I click on "New event" "button"
Then I should see "User" in the "div#fitem_id_staticeventtype" "css_element"