diff --git a/mod/bigbluebuttonbn/tests/behat/add_instance.feature b/mod/bigbluebuttonbn/tests/behat/add_instance.feature index c77feb76c15..bf7b22d43d8 100644 --- a/mod/bigbluebuttonbn/tests/behat/add_instance.feature +++ b/mod/bigbluebuttonbn/tests/behat/add_instance.feature @@ -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 "" from the "Instance type" singleselect + And I select "" from the "Instance type" singleselect Then I should see "Restrict access" Examples: diff --git a/mod/bigbluebuttonbn/tests/behat/edit_instance.feature b/mod/bigbluebuttonbn/tests/behat/edit_instance.feature index 0b1f58cd69c..a451ab189cf 100644 --- a/mod/bigbluebuttonbn/tests/behat/edit_instance.feature +++ b/mod/bigbluebuttonbn/tests/behat/edit_instance.feature @@ -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 | | - | Instance type | | - | Room name | | - Given I am on the "" "bigbluebuttonbn activity" page logged in as admin + Given the following "activities" exist: + | activity | course | name | type | + | bigbluebuttonbn | Test course | | | + When I am on the "" "bigbluebuttonbn activity" page logged in as admin And I click on "Settings" "link" - And the field "Instance type" matches value "" + Then the field "Instance type" matches value "" And I "Role assigned during live session" And I expand all fieldsets And I "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 |