Skip to content

Commit

Permalink
MDL-82911 @mod_bigbluebuttonbn: Behat to test BBB open and close date…
Browse files Browse the repository at this point in the history
… time
  • Loading branch information
andelacruz committed Oct 9, 2024
1 parent 67f5ee3 commit 3cf8e1b
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions mod/bigbluebuttonbn/tests/behat/open_close_date_time_bbb.feature
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"

0 comments on commit 3cf8e1b

Please sign in to comment.