MDL-75063 behat: BigBlueButton behat generators use UI

Replace steps that manually add BigBlueButton instances via the UI
and use Behat generators. This improves the speed of the Behat test
runs.

Co-authored-by: Simey Lameze <[email protected]>
This commit is contained in:
Angelia Dela Cruz
2022-08-05 17:29:51 +08:00
co-authored by Simey Lameze
parent 8eb4217a49
commit 9dca9da48c
2 changed files with 25 additions and 43 deletions
@@ -10,52 +10,35 @@ Feature: bigbluebuttonbn instance
And the following "courses" exist:
| fullname | shortname | category |
| Test course | Test course | 0 |
And the following "activities" exist:
| activity | course | name | type |
| bigbluebuttonbn | Test course | BBB Instance name | 0 |
| bigbluebuttonbn | Test course | BBB Instance name 2 | 1 |
| bigbluebuttonbn | Test course | BBB Instance name 3 | 2 |
And I am on the "Test course" "course" page logged in as "admin"
Scenario: Add a mod_bigbluebuttonbn instance with Room with recordings
Given I am on the "Test course" "course" page logged in as "admin"
And I am on "Test course" course homepage with editing mode on
When I add a "BigBlueButton" to section "1" and I fill the form with:
| name | BBB Instance name |
| Instance type | Room with recordings |
| Room name | BBB Instance name |
And I am on the "Test course" course page
Then I should see "BBB Instance name"
And I am on the "BBB Instance name" "bigbluebuttonbn activity" page
And I should see "This room is ready. You can join the session now."
When I am on the "BBB Instance name" "bigbluebuttonbn activity" page
Then I should see "This room is ready. You can join the session now."
And I should see "Join session"
And I should see "Recordings"
Scenario: Add a mod_bigbluebuttonbn instance with Room only
Given I am on the "Test course" "course" page logged in as "admin"
And I am on "Test course" course homepage with editing mode on
When I add a "BigBlueButton" to section "1" and I fill the form with:
| Instance type | Room only |
| Room name | BBB Instance name |
And I am on the "Test course" course page
Then I should see "BBB Instance name"
And I am on the "BBB Instance name" "bigbluebuttonbn activity" page
And I should see "This room is ready. You can join the session now."
When I am on the "BBB Instance name 2" "bigbluebuttonbn activity" page
Then I should see "This room is ready. You can join the session now."
And I should see "Join session"
And I should not see "Recordings"
Scenario: Add a mod_bigbluebuttonbn instance with Recordings only
Given I am on the "Test course" "course" page logged in as "admin"
And I am on "Test course" course homepage with editing mode on
When I add a "BigBlueButton" to section "1" and I fill the form with:
| Instance type | Recordings only |
| Room name | BBB Instance name |
And I am on the "Test course" course page
Then I should see "BBB Instance name"
And I am on the "BBB Instance name" "bigbluebuttonbn activity" page
When I am on the "BBB Instance name 3" "bigbluebuttonbn activity" page
And I should not see "This room is ready. You can join the session now."
And I should not see "Join session"
And I should see "Recordings"
Scenario Outline: Add an activity and check that required settings are available for the three types of instance types
Given I am on the "Test course" "course" page logged in as "admin"
And I am on "Test course" course homepage with editing mode on
When I turn editing mode on
And I add a "BigBlueButton" to section "1"
When I select "<type>" from the "Instance type" singleselect
And I select "<type>" from the "Instance type" singleselect
Then I should see "Restrict access"
Examples:
@@ -1,6 +1,8 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: I can edit a bigbluebutton instance
When a bibluebutton instance has been created I can edit it
In order to edit a room activity with recordings
As a user
I need to add three room activities to an existent course
Background: Make sure that a course is created
Given a BigBlueButton mock server is configured
@@ -12,20 +14,17 @@ When a bibluebutton instance has been created I can edit it
| Test course | Test course | 0 |
Scenario Outline: Add a mod_bigbluebuttonbn instance with Room with recordings
Then I log in as "admin"
And I am on "Test course" course homepage with editing mode on
When I add a "BigBlueButton" to section "1" and I fill the form with:
| name | <activityname> |
| Instance type | <instancetype> |
| Room name | <activityname> |
Given I am on the "<activityname>" "bigbluebuttonbn activity" page logged in as admin
Given the following "activities" exist:
| activity | course | name | type |
| bigbluebuttonbn | Test course | <activityname> | <instancetype> |
When I am on the "<activityname>" "bigbluebuttonbn activity" page logged in as admin
And I click on "Settings" "link"
And the field "Instance type" matches value "<instancetype>"
Then the field "Instance type" matches value "<instancetype>"
And I <shouldseerole> "Role assigned during live session"
And I expand all fieldsets
And I <shouldseesession> "The session may be recorded."
Examples:
| activityname | instancetype | shouldseerole | shouldseesession |
| Activity with recording | Room with recordings | should see | should see |
| Activity only | Room only | should see | should see |
| Recordings only | Recordings only | should not see | should not see |
| activityname | instancetype | shouldseerole | shouldseesession |
| Activity with recording | 0 | should see | should see |
| Activity only | 1 | should see | should see |
| Recordings only | 2 | should not see | should not see |