forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-82911 @mod_bigbluebuttonbn: Behat to test BBB open and close date…
… time
- Loading branch information
1 parent
67f5ee3
commit 3cf8e1b
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
mod/bigbluebuttonbn/tests/behat/open_close_date_time_bbb.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@mod @mod_bigbluebuttonbn | ||
Feature: Teacher can define open and close date and time | ||
# TODO: Rename file and add a description | ||
|
||
Background: | ||
Given a BigBlueButton mock server is configured | ||
And I enable "bigbluebuttonbn" "mod" plugin | ||
And the following config values are set as admin: | ||
| bigbluebuttonbn_userlimit_editable | 1 | | ||
And the following "courses" exist: | ||
| name | 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 | | ||
And the following "activities" exist: | ||
| course | activity | name | openingtime | closingtime | | ||
| C1 | bigbluebuttonbn | BBB 1 | ##now +10 minutes## | ##now +15 minutes## | | ||
|
||
Scenario: Teacher can define open and close date and time | ||
When I am on the "BBB 1" "bigbluebuttonbn activity" page logged in as teacher | ||
Then I should see "Open: ##now +10 minutes##%A, %d %B %Y, %I:%M##" | ||
And I should see "Close: ##now +15 minutes##%A, %d %B %Y, %I:%M##" | ||
And I am on the "Course 1" course page | ||
And I follow "Course calendar" | ||
And I should see "BBB 1" | ||
And I am on site homepage | ||
And I follow "Dashboard" | ||
And I should see "BBB 1" in the "Upcoming events" "block" | ||
And I am on the "BBB 1" "bigbluebuttonbn activity" page logged in as student1 | ||
And "Join session" "button" should not exist | ||
And I should see "Open: ##now +10 minutes##%A, %d %B %Y, %I:%M##" | ||
And I should see "Close: ##now +15 minutes##%A, %d %B %Y, %I:%M##" | ||
And I am on the "Course 1" course page | ||
And I follow "Course calendar" | ||
And I should see "BBB 1" | ||
And I am on site homepage | ||
And I follow "Dashboard" | ||
And I should see "BBB 1" in the "Upcoming events" "block" |