diff --git a/calendar/tests/behat/calendar.feature b/calendar/tests/behat/calendar.feature index f1ed7e698c7..5f1ffaf5043 100644 --- a/calendar/tests/behat/calendar.feature +++ b/calendar/tests/behat/calendar.feature @@ -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"