diff --git a/mod/bigbluebuttonbn/tests/behat/bigbluebuttonbn_activity_availability.feature b/mod/bigbluebuttonbn/tests/behat/bigbluebuttonbn_activity_availability.feature new file mode 100644 index 00000000000..7256d112b44 --- /dev/null +++ b/mod/bigbluebuttonbn/tests/behat/bigbluebuttonbn_activity_availability.feature @@ -0,0 +1,44 @@ +@mod @mod_bigbluebuttonbn +Feature: Manage BigBlueButton session timings + As a teacher + I want to set and manage the open and close times for BigBlueButton sessions + So that I can control when students can join the sessions + + Background: + Given a BigBlueButton mock server is configured + And the following "courses" exist: + | fullname | shortname | + | Course 1 | C1 | + And the following "users" exist: + | username | firstname | lastname | email | + | teacher1 | Teacher | One | teacher1@example.com | + | student1 | Student | One | student1@example.com | + And the following "course enrolments" exist: + | user | course | role | + | teacher1 | C1 | editingteacher | + | student1 | C1 | student | + And the following "blocks" exist: + | blockname | contextlevel | reference | pagetypepattern | defaultregion | + | calendar_upcoming | System | 1 | my-index | side-post | + + Scenario Outline: Setting and verifying BBB activity open and close times + Given the following "activities" exist: + | course | activity | name | openingtime | closingtime | + | C1 | bigbluebuttonbn | BBB 1 | | | + When I am on the "BBB 1" "bigbluebuttonbn activity" page logged in as student1 + And "Join session" "link" exist + And I should see "Open:" + And I should see "%A, %d %B %Y, %I:%M##" + And I should see "Close:" + And I should see "%A, %d %B %Y, %I:%M##" + And I am viewing calendar in "month" view + And I see "BBB 1" + And I am on site homepage + And I follow "Dashboard" + And I see "BBB 1" in the "Upcoming events" "block" + + Examples: + | openingtime | closingtime | calendarvisibility | buttonvisibility | upcomingeventvisibility | + | ##tomorrow## | ##tomorrow 10:00## | should | should not | should | + | ##1 hour ago## | ##+2 hours## | should | should | should not | + | ##yesterday## | ##yesterday +3 hours## | should not | should not | should not |