first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,54 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: bigbluebuttonbn instance
In order to create 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
And I enable "bigbluebuttonbn" "mod" plugin
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
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
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
When I am on the "BBB Instance name 3" "bigbluebuttonbn activity" page
Then 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: Add a Recording Only activity and check that no live session settings are available for this instance type
When I change window size to "large"
And I add a bigbluebuttonbn activity to course "Test course" section "1"
And I select "Recordings only" from the "Instance type" singleselect
Then I should not see "Lock settings"
Scenario Outline: Add an activity and check that required settings are available for the three types of instance types
When I change window size to "large"
And I add a bigbluebuttonbn activity to course "Test course" section "1"
And I select "<type>" from the "Instance type" singleselect
Then I should see "Restrict access"
Examples:
| type |
| Room with recordings |
| Room only |
| Recordings only |
@@ -0,0 +1,48 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: I can create a bigbluebuttonbn instance with default server
In case the BigBlueButton server has not been configured
As a user
I want to see a notification message
Background: Make sure that a course is created
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test course | Test course | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User1G1 | 1 | user1@example.com |
| teacher1 | TeacherG1 | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| user1 | Test course | student |
| teacher1 | Test course | editingteacher |
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 Outline: Add an activity using default server for the three types of instance types
When I change window size to "large"
And I add a bigbluebuttonbn activity to course "Test course" section "1"
And I select "<type>" from the "Instance type" singleselect
Then I should see "Restrict access"
Examples:
| type |
| Room with recordings |
| Room only |
| Recordings only |
Scenario Outline: Users should see a notification message when accessing activities if the default server is used
When I am on the "BBB Instance name" Activity page logged in as <user>
Then "Join session" "link" should exist
And I <messageexist> "<shouldseemessage>"
Examples:
| user | shouldseemessage | messageexist |
| user1 | The BigBlueButton server credentials will soon expire. | should not see |
| teacher1 | The BigBlueButton server credentials will soon expire. | should see |
| admin | The BigBlueButton server credentials will soon expire. | should see |
@@ -0,0 +1,275 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Behat custom steps and configuration for mod_bigbluebuttonbn.
*
* @package mod_bigbluebuttonbn
* @category test
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../../lib/behat/behat_base.php');
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use Behat\Gherkin\Node\TableNode;
use mod_bigbluebuttonbn\instance;
use mod_bigbluebuttonbn\local\config;
use mod_bigbluebuttonbn\test\subplugins_test_helper_trait;
use Moodle\BehatExtension\Exception\SkippedException;
require_once(__DIR__ . '../../../classes/test/subplugins_test_helper_trait.php');
/**
* Behat custom steps and configuration for mod_bigbluebuttonbn.
*
* @package mod_bigbluebuttonbn
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_mod_bigbluebuttonbn extends behat_base {
use subplugins_test_helper_trait;
/**
* @var array List of installed subplugins.
*/
protected $installedsubplugins = [];
/**
* BeforeScenario hook to reset the remote testpoint.
*
* @BeforeScenario @mod_bigbluebuttonbn
*
* @param BeforeScenarioScope $scope
*/
public function before_scenario(BeforeScenarioScope $scope) {
if (defined('TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER')) {
$this->send_mock_request('backoffice/reset');
}
// Fields are empty by default which causes tests to fail.
set_config('bigbluebuttonbn_server_url', config::DEFAULT_SERVER_URL);
set_config('bigbluebuttonbn_shared_secret', config::DEFAULT_SHARED_SECRET);
}
/**
* Check that the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER is defined, so we can connect to the mock server.
*
* @Given /^a BigBlueButton mock server is configured$/
*/
public function mock_is_configured(): void {
if (!defined('TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER')) {
throw new SkippedException(
'The TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER constant must be defined to run mod_bigbluebuttonbn tests'
);
}
set_config('bigbluebuttonbn_server_url', TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER);
}
/**
* Return the list of exact named selectors.
*
* @return array
*/
public static function get_exact_named_selectors(): array {
return [
new behat_component_named_selector('Meeting field', [
<<<XPATH
.//*[@data-identifier=%locator%]
XPATH
], false),
];
}
/**
* Retrieve the mock server URL from the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER definition
*
* @param string $endpoint
* @param array $params
* @return moodle_url
*/
public static function get_mocked_server_url(string $endpoint = '', array $params = []): moodle_url {
return new moodle_url(TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER . '/' . $endpoint, $params);
}
/**
* Send a query to the mock server
*
* @param string $endpoint
* @param array $params
*/
protected function send_mock_request(string $endpoint, array $params = []): void {
$url = $this->get_mocked_server_url($endpoint, $params);
$curl = new \curl();
$curl->get($url->out_omit_querystring(), $url->params());
}
/**
* Convert page names to URLs for steps like 'When I am on the "[page name]" page'.
*
* Recognised page names are:
* | None so far! | |
*
* @param string $page name of the page, with the component name removed e.g. 'Admin notification'.
* @return moodle_url the corresponding URL.
* @throws Exception with a meaningful error message if the specified page cannot be found.
*/
protected function resolve_page_url(string $page): moodle_url {
throw new Exception("Unrecognised page type '{$page}'.");
}
/**
* Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'.
*
* Recognised page names are:
* | pagetype | name meaning | description |
* | Index | BBB Course Index | The bbb index page (index.php) |
*
* @param string $type identifies which type of page this is, e.g. 'Indez'.
* @param string $identifier identifies the particular page, e.g. 'Mathematics 101'.
* @return moodle_url the corresponding URL.
* @throws Exception with a meaningful error message if the specified page cannot be found.
*/
protected function resolve_page_instance_url(string $type, string $identifier): moodle_url {
switch ($type) {
case 'Index':
$this->get_course_id($identifier);
return new moodle_url('/mod/bigbluebuttonbn/index.php', [
'id' => $this->get_course_id($identifier),
]);
case 'BigblueButtonBN Guest':
$cm = $this->get_cm_by_activity_name('bigbluebuttonbn', $identifier);
$instance = instance::get_from_cmid($cm->id);
$url = $instance->get_guest_access_url();
// We have to make sure we set the password. It makes it then easy to submit the form with the right password.
$url->param('password', $instance->get_guest_access_password());
return $url;
default:
throw new Exception("Unrecognised page type '{$type}'.");
}
}
/**
* Get course id from its identifier (shortname or fullname or idnumber)
*
* @param string $identifier
* @return int
*/
protected function get_course_id(string $identifier): int {
global $DB;
return $DB->get_field_select(
'course',
'id',
"shortname = :shortname OR fullname = :fullname OR idnumber = :idnumber",
[
'shortname' => $identifier,
'fullname' => $identifier,
'idnumber' => $identifier,
],
MUST_EXIST
);
}
/**
* Trigger a recording ready notification on BBB side
*
* @Given the BigBlueButtonBN server has sent recording ready notifications
*/
public function trigger_recording_ready_notification(): void {
$this->send_mock_request('backoffice/sendRecordingReadyNotifications', [
'secret' => \mod_bigbluebuttonbn\local\config::DEFAULT_SHARED_SECRET,
]
);
}
/**
* Trigger a meeting event on BBB side
*
* @Given /^the BigBlueButtonBN server has received the following events from user "(?P<element_string>(?:[^"]|\\")*)":$/
* @param string $username
* @param TableNode $data
*/
public function trigger_meeting_event(string $username, TableNode $data): void {
global $DB;
$user = core_user::get_user_by_username($username);
$rows = $data->getHash();
foreach ($rows as $elementdata) {
$instanceid = $DB->get_field('bigbluebuttonbn', 'id', [
'name' => $elementdata['instancename'],
]);
$instance = \mod_bigbluebuttonbn\instance::get_from_instanceid($instanceid);
$this->send_mock_request('backoffice/addMeetingEvent', [
'secret' => \mod_bigbluebuttonbn\local\config::DEFAULT_SHARED_SECRET,
'meetingID' => $instance->get_meeting_id(),
'attendeeID' => $user->id,
'attendeeName' => fullname($user),
'eventType' => $elementdata['eventtype'],
'eventData' => $elementdata['eventdata'] ?? '',
]
);
}
}
/**
* Send all events received for this meeting back to moodle
*
* @Given /^the BigBlueButtonBN activity "(?P<element_string>(?:[^"]|\\")*)" has sent recording all its events$/
* @param string $instancename
*/
public function trigger_all_events(string $instancename): void {
global $DB;
$instanceid = $DB->get_field('bigbluebuttonbn', 'id', [
'name' => $instancename,
]);
$instance = \mod_bigbluebuttonbn\instance::get_from_instanceid($instanceid);
$this->send_mock_request('backoffice/sendAllEvents', [
'meetingID' => $instance->get_meeting_id(),
'sendQuery' => true
]
);
}
/**
* Install the simple subplugin
*
* Important note here. Originally we had a step that was installing the plugin, however
* because of race condition (mainly javascript calls), the hack to the core_component was
* randomly lost due to the component cache being cleared. So we have to install the plugin before
* any interaction with the site.
* @BeforeScenario @with_bbbext_simple
*/
public function install_simple_subplugin() {
$this->setup_fake_plugin("simple");
$mockedcomponent = new ReflectionClass(core_component::class);
$mockedplugintypes = $mockedcomponent->getProperty('plugintypes');
$mockedplugintypes->setValue(null, null);
$init = $mockedcomponent->getMethod('init');
$init->invoke(null);
// I enable the plugin.
$manager = core_plugin_manager::resolve_plugininfo_class(\mod_bigbluebuttonbn\extension::BBB_EXTENSION_PLUGIN_NAME);
$manager::enable_plugin("simple", true);
}
/**
* Uninstall the simple subplugin
*
* @AfterScenario @with_bbbext_simple
*/
public function uninstall_simple_subplugin() {
$this->uninstall_fake_plugin("simple");
}
}
@@ -0,0 +1,71 @@
@mod @mod_bigbluebuttonbn
Feature: As a user I can complete a BigblueButtonBN activity by usual or custom criteria
Background:
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Test course | C1 | 0 | 1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | type | recordings_imported |
| bigbluebuttonbn | RoomRecordings | Test Room Recording description | C1 | bigbluebuttonbn1 | 0 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | student |
Scenario: I set the completion to standard type of completion.
Given I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
When I click on "Settings" "link"
And I expand all fieldsets
And I set the following fields to these values:
| Add requirements | 1 |
| View the activity | 1 |
And I press "Save and display"
And I log out
And I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as traverst
Then I should see "Done: View"
@javascript
Scenario: I set the completion type to custom completion
Given a BigBlueButton mock server is configured
And the following config values are set as admin:
| bigbluebuttonbn_meetingevents_enabled | 1 |
And I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
And I click on "Settings" "link"
And I expand all fieldsets
And I set the following fields to these values:
| Add requirements | 1 |
| Chats | 1 |
And I press "Save and display"
# We start the meeting here so to make sure that meta_analytics-callback-url is set.
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | RoomRecordings |
And I log out
And I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as traverst
When I click on "Join session" "link"
And I switch to "bigbluebutton_conference" window
And I wait until the page is ready
And I follow "End Meeting"
And the BigBlueButtonBN server has received the following events from user "traverst":
| instancename | eventtype | eventdata |
| RoomRecordings | chats | 1 |
# Selenium driver does not like the click action to be done before we
# automatically close the window so we need to make sure that the window
# is closed before.
And I close all opened windows
And I switch to the main window
And the BigBlueButtonBN activity "RoomRecordings" has sent recording all its events
And I run all adhoc tasks
And I reload the page
Then I should see "Done: Participate in 1 chat(s)"
@javascript
Scenario: Validate completion when registering live sessions
Given the following config values are set as admin:
| bigbluebuttonbn_meetingevents_enabled | 1 |
When I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
And I click on "Validate completion" "link"
Then I should see "Validate completion has been triggered."
@@ -0,0 +1,59 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: I can edit a bigbluebutton instance
As a user I can edit a BigbluebuttonBN instance
Background: Make sure that a course is created
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
And the following config values are set as admin:
| bigbluebuttonbn_voicebridge_editable | 1 |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Test course | Test course | 0 | 1 |
Scenario Outline: Add a mod_bigbluebuttonbn instance with Room with recordings
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"
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 | 0 | should see | should see |
| Activity only | 1 | should see | should see |
| Recordings only | 2 | should not see | should not see |
Scenario: When the activity completion are locked, all the completion settings, including
the one specific to BigBlueButtonBN are disabled
Given the following "activities" exist:
| activity | course | name | type |
| bigbluebuttonbn | Test course | RoomRecordings | 0 |
And the following config values are set as admin:
| bigbluebuttonbn_config_experimental_features | 1 |
| bigbluebuttonbn_meetingevents_enabled | 1 |
And the following "users" exist:
| username | firstname | lastname |
| student1 | Student1 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | Test course | student |
And I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin"
And I expand all fieldsets
And I set the following fields to these values:
| Add requirements | 1 |
| View the activity | 1 |
And I press "Save and return to course"
And I log out
# Then I visit the page first to make sure that completion settings are locked.
And I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as "student1"
And I log out
And I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin"
When I expand all fieldsets
Then I should see "Completion options locked"
And the "View the activity" "field" should be disabled
And the "Require attendance (minutes)" "field" should be disabled
And the "Chats" "field" should be disabled
@@ -0,0 +1,103 @@
@mod @mod_bigbluebuttonbn
Feature: Test the ability to end a meeting
In order to ensure that end meeting capabilities are respected
As a teacher
I need to control who can end a meeting
Background:
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
Scenario Outline: Only a BigBlueButton moderator can end a session
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | <role> |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | <moderators> |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | Room recordings |
When I am on the "Room recordings" Activity page logged in as traverst
Then "End session" "link" <existence> exist
Examples:
# Note: If the teacher is not listed as a moderator in the activity roles, then will not have permission to end the
# session.
| moderators | role | existence |
| | editingteacher | should not |
| | teacher | should not |
| | student | should not |
| role:teacher | student | should not |
| role:teacher | teacher | should |
| role:student | student | should |
| user:traverst | student | should |
Scenario: An administrator can always end a meeting
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | Room recordings |
When I am on the "Room recordings" Activity page logged in as admin
Then "End session" "link" should exist
Scenario Outline: Only a BigBlueButton moderator can end a session from the index page
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | <role> |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | <moderators> |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | Room recordings |
When I am on the C1 "mod_bigbluebuttonbn > Index" page logged in as traverst
Then "End session" "link" <existence> exist
Examples:
# Note: If the teacher is not listed as a moderator in the activity roles, then will not have permission to end the
# session.
| moderators | role | existence |
| | editingteacher | should not |
| | teacher | should not |
| | student | should not |
| role:teacher | student | should not |
| role:teacher | teacher | should |
| role:student | student | should |
| user:traverst | student | should |
Scenario: An administrator can always end a meeting on the index page
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | Room recordings |
When I am on the C1 "mod_bigbluebuttonbn > Index" page logged in as admin
Then "End session" "link" should exist
@@ -0,0 +1,140 @@
@mod @mod_bigbluebuttonbn @course
Feature: Test the module in group mode.
Background:
# groupmode 1 = separate groups, we force the group
# groupmode 2 = visible group
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category | groupmode | groupmodeforce |
| Test Course 1 | C1 | 0 | 1 | 1 |
| Test Course 2 | C2 | 0 | 2 | 1 |
And the following "groups" exist:
| name | course | idnumber | participation |
| Group 1 | C1 | G1 | 1 |
| Group 2 | C1 | G2 | 1 |
| Group 3 | C1 | G3 | 0 |
| Group 1 | C2 | G1b | 1 |
| Group 2 | C2 | G2b | 1 |
| Group 3 | C2 | G3b | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | TeacherG1 | 1 | teacher1@example.com |
| user1 | User1G1 | 1 | user1@example.com |
| user2 | User2G2 | 2 | user2@example.com |
| user3 | User3NoGgroup | 3 | user3@example.com |
| user4 | User4NPGgroup | 4 | user4@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| user1 | C1 | student |
| user2 | C1 | student |
| user3 | C1 | student |
| user4 | C1 | student |
| teacher1 | C2 | editingteacher |
| user1 | C2 | student |
| user2 | C2 | student |
| user3 | C2 | student |
| user4 | C2 | student |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
| user1 | G1 |
| user2 | G2 |
| user4 | G3 |
| teacher1 | G1b |
| user1 | G1b |
| user2 | G2b |
| user4 | G3b |
And the following "activities" exist:
| activity | name | intro | course | idnumber | type | recordings_imported |
| bigbluebuttonbn | RoomRecordings | Test Room Recording description | C1 | bigbluebuttonbn1 | 0 | 0 |
| bigbluebuttonbn | RoomRecordingsVisibleGroups | Test Room Recording with visible groups | C2 | bigbluebuttonbn2 | 0 | 0 |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | RoomRecordings |
| activity | RoomRecordingsVisibleGroups |
And the following "mod_bigbluebuttonbn > meetings" exist:
| activity | group |
| RoomRecordings | G1 |
| RoomRecordings | G2 |
| RoomRecordings | G3 |
| RoomRecordingsVisibleGroups | G1b |
| RoomRecordingsVisibleGroups | G2b |
| RoomRecordings | G3b |
And the following "mod_bigbluebuttonbn > recordings" exist:
| bigbluebuttonbn | name | group |
| RoomRecordings | Recording G1 | G1 |
| RoomRecordings | Recording G2 | G2 |
| RoomRecordings | Recording G3 | G3 |
| RoomRecordingsVisibleGroups | Recording G1b | G1b |
| RoomRecordingsVisibleGroups | Recording G2b | G2b |
| RoomRecordings | Recording G3b | G3b |
And the following "mod_bigbluebuttonbn > recordings" exist:
| bigbluebuttonbn | name |
| RoomRecordings | Recording No group |
| RoomRecordingsVisibleGroups | Recording No group C2 |
@javascript
Scenario: When I create a BBB activity as a teacher who cannot access all groups,
I should only be able to select the group I belong on the main bigblue button page.
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:accessallgroups | Prevent | editingteacher | Course | C1 |
When I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as "teacher1"
Then I should see "Separate groups: Group 1"
@javascript
Scenario: When I create a BBB activity as a teacher, I should only be able to specify individual "User" participants with whom I share a group with (or can view on the course participants screen).
When I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as "teacher1"
Then I should see "Group 1" in the "select[name='group']" "css_element"
And I should see "Group 2" in the "select[name='group']" "css_element"
And I should not see "Group 3" in the "select[name='group']" "css_element"
@javascript
Scenario Outline: When I view a BBB activity as a student in a course with separate groups, I should only be able to see Recordings from my group
When I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as "<user>"
Then I <G1> "Recording G1"
And I <G2> "Recording G2"
And I should not see "Recording G3"
And I <NO> "Recording No group"
Examples:
| user | G1 | G2 | NO |
| user1 | should see | should not see | should not see |
| user2 | should not see | should see | should not see |
| user3 | should not see | should not see | should not see |
| user4 | should not see | should not see | should not see |
@javascript
Scenario Outline: When I view a BBB activity as a student in a course with visible group set, I should be able to see Recordings from my group or
the default meeting if I am not in a group.
When I am on the "RoomRecordingsVisibleGroups" "bigbluebuttonbn activity" page logged in as "user3"
And I select "<groupname>" from the "group" singleselect
Then I <G1> "Recording G1b"
And I <G2> "Recording G2b"
And I should not see "Recording G3b"
And I <NO> "Recording No group C2"
Examples:
| groupname | G1 | G2 | NO |
| All participants | should see | should see | should see |
| Group 1 | should see | should not see | should not see |
| Group 2 | should not see | should see | should not see |
@javascript
Scenario Outline: When I view a BBB activity as a student in a course with visible group set, I should be able to join meeting if not I should not see the activity
When I am on the "<Activity>" "bigbluebuttonbn activity" page logged in as "<user>"
Then I should see "<Message>"
Examples:
| user | Activity | Message |
| user1 | RoomRecordings | Join session |
| user2 | RoomRecordings | Join session |
| user3 | RoomRecordings | You do not have a role that is allowed to join this session |
| user4 | RoomRecordings | You do not have a role that is allowed to join this session |
| user1 | RoomRecordingsVisibleGroups | Join session |
| user2 | RoomRecordingsVisibleGroups | Join session |
| user3 | RoomRecordingsVisibleGroups | Join session |
| user3 | RoomRecordingsVisibleGroups | Join session |
| user4 | RoomRecordings | You do not have a role that is allowed to join this session |
@@ -0,0 +1,85 @@
@mod @mod_bigbluebuttonbn
Feature: Guest access allows external users to connect to a meeting
Background:
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | type | recordings_imported | guestallowed |
| bigbluebuttonbn | RoomRecordings | Test Room Recording description | C1 | bigbluebuttonbn1 | 0 | 0 | 0 |
| bigbluebuttonbn | RoomRecordingsWithGuest | Test Room with guest | C1 | bigbluebuttonbn1 | 0 | 0 | 1 |
@javascript
Scenario Outline: I need to enable guest access to see the instance parameters
Given the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | <guestaccess> |
When I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin"
Then I <result> "Guest access"
And I log out
Examples:
| guestaccess | result |
| 1 | should see |
| 0 | should not see |
@javascript
Scenario Outline: I should see Guest settings on the module form
Given the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
When I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin"
And I should see "Guest access"
And I click on "Expand all" "link" in the "region-main" "region"
And I should see "Allow guest access"
And I set the field "Allow guest access" to <guestaccess>
Then I <result> "Guests joining must be admitted by a moderator"
And I <seelink> "Meeting link"
And I <seepassword> "Meeting password"
And I <seecopylink> "Copy link"
And I <seecopypw> "Copy password"
And I log out
Examples:
| guestaccess | result | seelink | seepassword | seecopylink | seecopypw |
| "1" | should see | should see | should see | should see | should see |
| "0" | should not see | should not see | should not see | should not see | should not see |
@javascript
Scenario: I should be able to use the guest link and see the popup dialog
Given the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
When I am on the "RoomRecordingsWithGuest" "bigbluebuttonbn activity" page logged in as "admin"
Then I click on "Add guests" "button"
And I should see "Meeting link"
And I should see "Meeting password"
And I should see "Copy link"
And I should see "Copy password"
@javascript
Scenario: I should see errors when submitting the guest access form with erroneous values
Given the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
And I am on the "RoomRecordingsWithGuest" "bigbluebuttonbn activity" page logged in as "admin"
And I click on "Add guests" "button"
And I set the field "Guest emails" to "123"
When I click on "OK" "button" in the "Add guests to this meeting" "dialogue"
Then I should see "Invalid email: 123"
@javascript
Scenario: I should be able to invite guest to the meeting
Given the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
When I am on the "RoomRecordingsWithGuest" "bigbluebuttonbn activity" page logged in as "admin"
And I click on "Add guests" "button"
And I set the field "Guest emails" to "testuser@email.com"
And I click on "OK" "button" in the "Add guests to this meeting" "dialogue"
Then I should see "An invitation will be sent to testuser@email.com."
And I log out
Scenario: I should be able to invite guest to the meeting even if forcelogin is set
Given the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
| forcelogin | 1 |
When I am on the "RoomRecordingsWithGuest" "mod_bigbluebuttonbn > BigblueButtonBN Guest" page
Then I should see "C1: RoomRecordingsWithGuest"
@@ -0,0 +1,65 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: Test the ability to run the full meeting lifecycle (start to end)
I can start a meeting then end it
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 course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
| uraverst | Uerry | Uravers | u.uravers@example.com |
| vraverst | Verry | Vravers | v.vravers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | student |
| uraverst | C1 | student |
| vraverst | C1 | student |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | role:editingteacher |
| wait | 0 |
| userlimit | 2 |
Scenario: Users should be able to join a meeting then end the meeting for themselves and
return to the meeting page to join again.
When I am on the "Room recordings" Activity page logged in as traverst
And "Join session" "link" should exist
And I click on "Join session" "link"
And I switch to "bigbluebutton_conference" window
And I click on "End Meeting" "link"
# Selenium driver does not like the click action to be done before we
# automatically close the window so we need to make sure that the window
# is closed before.
And I close all opened windows
And I switch to the main window
And I reload the page
Then I should see "Room recordings"
And I should see "This room is ready. You can join the session now."
Scenario: Users can join the meeting until the maximum number of users has been reached
When I am on the "Room recordings" Activity page logged in as traverst
Then "Join session" "link" should exist
And I click on "Join session" "link"
And I switch to the main window
And I log out
And I am on the "Room recordings" Activity page logged in as uraverst
And "Join session" "link" should exist
And I click on "Join session" "link"
And I switch to the main window
And I log out
And I am on the "Room recordings" Activity page logged in as vraverst
And "Join session" "link" should not exist
And I should see "The limit of how many users allowed in a session has been reached"
And I log out
And I am on the "Room recordings" Activity page logged in as admin
And "Join session" "link" should not exist
And I should see "The limit of how many users allowed in a session has been reached"
@@ -0,0 +1,53 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: Test the ability to run the full meeting lifecycle (start to end) for guest users
Background:
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
And the following config values are set as admin:
| bigbluebuttonbn_guestaccess_enabled | 1 |
And the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
| teacher | Teacher | Teacher | t.eacher@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | student |
| teacher | C1 | editingteacher |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | role:editingteacher |
| wait | 0 |
| guestallowed | 1 |
Scenario: Student users should be able to see the guest user information
When I am on the "Room recordings" Activity page logged in as traverst
Then I should not see "Add guests"
Scenario: Teacher users should be able to see the guest user information
When I am on the "Room recordings" Activity page logged in as teacher
And I should see "Add guests"
Then I click on "Add guests" "button"
And I should see "Add guests to this meeting" in the ".modal-dialog" "css_element"
Scenario: Guest users should be able to join a meeting as guest when the meeting is running.
When I am on the "Room recordings" Activity page logged in as traverst
And "Join session" "link" should exist
And I click on "Join session" "link"
And I switch to the main window
And I log out
And I close all opened windows
And I am on the "Room recordings" "mod_bigbluebuttonbn > BigblueButtonBN Guest" page
Then I should see "Guest username"
And I should see "Password"
And I set the field "username" to "Test Guest User"
And I click on "Join meeting" "button"
And I should see "Test Guest User"
And I click on "Leave Meeting" "link"
And I should see "C1: Room recordings"
@@ -0,0 +1,63 @@
@mod @mod_bigbluebuttonbn
Feature: Test that the meeting has the right lock setting.
In order to ensure that a meeting creator can lock settings in a meeting
As a teacher
I set up locked feature for a given meeting and this should be reflected in the meeting.
Background:
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
@javascript
Scenario Outline: Teacher should be able to set the right lock feature in a given meeting
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | editingteacher |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| <locksettingname> | <value> |
When I am on the "Room recordings" Activity page logged in as traverst
And I click on "Join session" "link"
And I switch to "bigbluebutton_conference" window
Then I should see "<bbbsettingvalue>" in the "lockSettings" "mod_bigbluebuttonbn > Meeting field"
Examples:
| locksettingname | value | bbbsettingvalue |
| disablecam | 1 | disableCam : enabled |
| disablemic | 1 | disableMic : enabled |
| disableprivatechat | 1 | disablePrivateChat : enabled |
| disablepublicchat | 1 | disablePublicChat : enabled |
| disablenote | 1 | disableNotes : enabled |
| hideuserlist | 1 | hideUserList : enabled |
@javascript
Scenario: If any lock Setting is enabled, then the LockOnJoin should be enabled
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | editingteacher |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| disablecam | 1 |
When I am on the "Room recordings" Activity page logged in as traverst
And I click on "Join session" "link"
And I switch to "bigbluebutton_conference" window
Then I should see "disableCam : enabled" in the "lockSettings" "mod_bigbluebuttonbn > Meeting field"
And I should see "lockOnJoin : enabled" in the "lockSettings" "mod_bigbluebuttonbn > Meeting field"
@@ -0,0 +1,40 @@
@mod @mod_bigbluebuttonbn
Feature: Test that meeting roles are sent to the server
In order to ensure that start meeting capabilities are respected
As a teacher
I need meeting roles to be sent to the meeting
Background:
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
@javascript
Scenario Outline: Users should receive the appropriate role when joining the meeting
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | <moodlerole> |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | <moderators> |
| viewers | <viewers> |
When I am on the "Room recordings" Activity page logged in as traverst
And I click on "Join session" "link"
And I switch to "bigbluebutton_conference" window
Then I should see "<meetingrole>" in the "attendeeRole" "mod_bigbluebuttonbn > Meeting field"
Examples:
| moderators | viewers | moodlerole | meetingrole |
| | | student | VIEWER |
| role:editingteacher | | editingteacher | MODERATOR |
| role:student | | editingteacher | VIEWER |
| role:student | | student | MODERATOR |
| user:traverst | | student | MODERATOR |
@@ -0,0 +1,73 @@
@mod @mod_bigbluebuttonbn
Feature: The recording can be managed through the room page
As a user I am able to see the relevant recording for a given bigbluebutton activity and modify its parameters
Background: Make sure that import recording is enabled and course, activities and recording exists
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
| Test Course 2 | C2 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
And the following "activities" exist:
| activity | name | intro | course | idnumber | type | recordings_imported |
| bigbluebuttonbn | RoomRecordings | Test Room Recording description | C1 | bigbluebuttonbn1 | 0 | 0 |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | RoomRecordings |
And the following "mod_bigbluebuttonbn > recordings" exist:
| bigbluebuttonbn | name | description | status |
| RoomRecordings | Recording 1 | Description 1 | 2 |
| RoomRecordings | Recording 2 | Description 2 | 3 |
| RoomRecordings | Recording 3 | Description 3 | 0 |
| RoomRecordings | Recording 4 | Description 4 | 1 |
@javascript
Scenario: I can see the recordings related to an activity
Given I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
And "Recording 1" "table_row" should exist
And "Recording 2" "table_row" should exist
And "Recording 3" "table_row" should not exist
And "Recording 4" "table_row" should not exist
# Recording 3 will be fetched and metadata will be present so, we will see it.
When the BigBlueButtonBN server has sent recording ready notifications
And I run the scheduled task "mod_bigbluebuttonbn\task\check_pending_recordings"
And I reload the page
Then "Recording 1" "table_row" should exist
And "Recording 2" "table_row" should exist
And "Recording 3" "table_row" should exist
And "Recording 4" "table_row" should not exist
@javascript
Scenario: I can rename the recording
Given I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
When I set the field "Edit name" in the "Recording 1" "table_row" to "Recording with an updated name 1"
Then I should see "Recording with an updated name 1"
And I should see "Recording 2"
And I reload the page
And I should see "Recording with an updated name 1"
And I should see "Recording 2"
@javascript
Scenario: I can set a new description for this recording
Given I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
When I set the field "Edit description" in the "Recording 1" "table_row" to "This is a new recording description 1"
Then I should see "This is a new recording description 1"
And I should see "Description 2" in the "Recording 2" "table_row"
And I reload the page
And I should see "This is a new recording description 1" in the "Recording 1" "table_row"
And I should see "Description 2" in the "Recording 2" "table_row"
@javascript
Scenario: I can delete a recording
Given I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
And I change window size to "large"
When I click on "a[data-action='delete']" "css_element" in the "Recording 1" "table_row"
And I click on "OK" "button" in the "Confirm" "dialogue"
Then I should not see "Recording 1"
And I should see "Recording 2"
And I reload the page
And I should not see "Recording 1"
And I should see "Recording 2"
@@ -0,0 +1,122 @@
@mod @mod_bigbluebuttonbn @core_form @course
Feature: Manage and list recordings
As a user I am able to import existing recording into another bigbluebutton activity
Background: Make sure that import recording is enabled and course, activities and recording exists
Given a BigBlueButton mock server is configured
And the following config values are set as admin:
| bigbluebuttonbn_importrecordings_enabled | 1 |
| bigbluebuttonbn_importrecordings_from_deleted_enabled | 1 |
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
| Test Course 2 | C2 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
And the following "activities" exist:
| activity | name | intro | course | idnumber | type | recordings_imported |
| bigbluebuttonbn | RoomRecordings | Test Room Recording description | C1 | bigbluebuttonbn1 | 0 | 0 |
| bigbluebuttonbn | RoomRecordings1 | Test Recordings description 1 | C2 | bigbluebuttonbn2 | 0 | 1 |
| bigbluebuttonbn | RecordingOnly | Test Recordings only description 1 | C2 | bigbluebuttonbn3 | 2 | 1 |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | RoomRecordings |
And the following "mod_bigbluebuttonbn > recordings" exist:
| bigbluebuttonbn | name | status |
| RoomRecordings | Recording 1 | 3 |
| RoomRecordings | Recording 2 | 3 |
@javascript
Scenario: I check we display the right information (Recording Name as name and Description)
When I am on the "RoomRecordings1" "bigbluebuttonbn activity" page logged in as "admin"
# We check column names regarding changes made in CONTRIB-7703.
Then I should not see "Recording" in the ".mod_bigbluebuttonbn_recordings_table thead" "css_element"
And I should not see "Meeting" in the ".mod_bigbluebuttonbn_recordings_table thead" "css_element"
And I should see "Name" in the ".mod_bigbluebuttonbn_recordings_table thead" "css_element"
@javascript
Scenario Outline: I check that I can import recordings into the Recording activity from other activities
When I am on the "<instancename>" "bigbluebuttonbn activity" page logged in as "admin"
And I click on "Import recording links" "button"
And I select "Test Course 1 (C1)" from the "sourcecourseid" singleselect
And I select "RoomRecordings" from the "sourcebn" singleselect
# add the first recording
And I click on "a.action-icon" "css_element" in the "Recording 1" "table_row"
# add the second recording
And I click on "a.action-icon" "css_element" in the "Recording 2" "table_row"
And I click on "Go back" "button"
Then "Recording 1" "table_row" <existence>
And "Recording 2" "table_row" <existence>
Examples:
| instancename | existence |
| RecordingOnly | should exist |
| RoomRecordings1 | should exist |
@javascript
Scenario: I check that I can import recordings into the Recording activity and then if I delete them
they are back into the pool to be imported again
When I am on the "RoomRecordings1" "bigbluebuttonbn activity" page logged in as "admin"
And I change window size to "large"
And I click on "Import recording links" "button"
And I select "Test Course 1 (C1)" from the "sourcecourseid" singleselect
And I select "RoomRecordings" from the "sourcebn" singleselect
# add the first recording
And I click on "a.action-icon" "css_element" in the "Recording 1" "table_row"
# add the second recording
And I click on "a.action-icon" "css_element" in the "Recording 2" "table_row"
And I wait until the page is ready
And I click on "Go back" "button"
# This should be refactored with the right classes for the table element
# We use javascript here to create the table so we don't get the same structure.
Then "Recording 1" "table_row" should exist
And I click on "a[data-action='delete']" "css_element" in the "Recording 1" "table_row"
And I click on "OK" "button" in the "Confirm" "dialogue"
# There is no confirmation dialog when deleting an imported record.
And I wait until the page is ready
But I should not see "Recording 1"
And I click on "Import recording links" "button"
And I select "Test Course 1 (C1)" from the "sourcecourseid" singleselect
And I select "RoomRecordings" from the "sourcebn" singleselect
And I should see "Recording 1"
@javascript @runonly
Scenario: I check that I can import recordings from a deleted instance into the Recording activity and then if I delete them
they are back into the pool to be imported again
Given I log in as "admin"
When I am on "Test Course 1" course homepage with editing mode on
And I delete "RoomRecordings" activity
# The activity is deleted asynchroneously.
And I run all adhoc tasks
And I am on the "RoomRecordings1" "bigbluebuttonbn activity" page logged in as "admin"
And I click on "Import recording links" "button"
And I select "Recordings from deleted activities" from the "sourcecourseid" singleselect
Then I should see "Recording 1"
And I should see "Recording 2"
# add the first recording
And I click on "a.action-icon" "css_element" in the "Recording 1" "table_row"
# add the second recording
And I click on "a.action-icon" "css_element" in the "Recording 2" "table_row"
And I wait until the page is ready
And I click on "Go back" "button"
# This should be refactored with the right classes for the table element
# We use javascript here to create the table so we don't get the same structure.
And "Recording 1" "table_row" should exist
And I click on "a[data-action='delete']" "css_element" in the "Recording 1" "table_row"
And I click on "OK" "button" in the "Confirm" "dialogue"
# There is no confirmation dialog when deleting an imported record.
And I wait until the page is ready
But I should not see "Recording 1"
# Change window size to large to avoid the "Import recording links" button being hidden (random failure).
And I change window size to "large"
And I click on "Import recording links" "button"
And I select "Recordings from deleted activities" from the "sourcecourseid" singleselect
And I should see "Recording 1"
But I should not see "Recording 2"
Scenario: I check that when I disable Import recording feature the import recording link button should not be shown
Given I log in as "admin"
And the following config values are set as admin:
| bigbluebuttonbn_importrecordings_enabled | 0 |
When I am on the "RoomRecordings1" "bigbluebuttonbn activity" page logged in as "admin"
Then I should not see "Import recording links"
@@ -0,0 +1,25 @@
@mod @mod_bigbluebuttonbn @javascript
Feature: Set role as Bigbluebuttonbn moderator
In order to set a room moderator
As admin
I need to see the list of roles
Background:
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "course" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | RoomRecordings |
Scenario: Set the manager role as room moderator
Given I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin"
And I set the field "bigbluebuttonbn_participant_selection_type" to "Role"
And I set the field "bigbluebuttonbn_participant_selection" to "Manager"
And I click on "bigbluebuttonbn_participant_selection_add" "button"
And I set the field "select-for-role-1" to "Moderator"
And I press "Save and display"
When I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page
Then "[name=select-for-role-1] option[value=moderator][selected]" "css_element" should exist
@@ -0,0 +1,35 @@
@mod @mod_bigbluebuttonbn @core_form @course
Feature: The recording can be managed through the room page and as a user I can interact with the table
Background: Make sure that import recording is enabled and course, activities and recording exists
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category |
| Test Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
And the following "activities" exist:
| activity | name | intro | course | idnumber | type | recordings_imported |
| bigbluebuttonbn | RoomRecordings | Test Room Recording description | C1 | bigbluebuttonbn1 | 0 | 0 |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | RoomRecordings |
And the following "mod_bigbluebuttonbn > recordings" exist:
| bigbluebuttonbn | name | description | status | starttime |
| RoomRecordings | Recording 1 | Description 1 | 2 | 1619666194 |
| RoomRecordings | Recording 2 | Description 2 | 2 | 1639668194 |
| RoomRecordings | Recording 3 | Description 3 | 2 | 1629666194 |
| RoomRecordings | Recording 4 | Description 4 | 2 | 1649666194 |
@javascript
Scenario: Recording should be sortable by date
Given I am on the "RoomRecordings" "bigbluebuttonbn activity" page logged in as admin
When I click on "th[data-yui3-col-id='date'] .yui3-datatable-sort-indicator" "css_element"
And "Recording 1" "text" should appear before "Recording 3" "text"
And "Recording 3" "text" should appear before "Recording 2" "text"
And "Recording 2" "text" should appear before "Recording 4" "text"
And I click on "th[data-yui3-col-id='date'] .yui3-datatable-sort-indicator" "css_element"
Then "Recording 1" "text" should appear after "Recording 3" "text"
And "Recording 3" "text" should appear after "Recording 2" "text"
And "Recording 2" "text" should appear after "Recording 4" "text"
@@ -0,0 +1,114 @@
@mod @mod_bigbluebuttonbn
Feature: Test the ability to start a meeting
In order to ensure that start meeting capabilities are respected
As a teacher
I need to control who can start a meeting
Background:
Given a BigBlueButton mock server is configured
And I enable "bigbluebuttonbn" "mod" plugin
Scenario Outline: Users should be able to join a session depending on the Wait for moderator to join setting
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | <role> |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | role:editingteacher |
| wait | <wait> |
When I am on the "Room recordings" Activity page logged in as traverst
Then "Join session" "link" <existence> exist
Examples:
| wait | role | existence |
| 0 | student | should |
| 0 | teacher | should |
| 0 | editingteacher | should |
| 1 | student | should not |
| 1 | teacher | should not |
| 1 | editingteacher | should |
Scenario Outline: Users should be able to join a session if a moderator has already joined
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | <role> |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | role:editingteacher |
| wait | <wait> |
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | Room recordings |
| moderatorCount | 1 |
When I am on the "Room recordings" Activity page logged in as traverst
Then "Join session" "link" should exist
Examples:
| wait | role |
| 0 | student |
| 0 | editingteacher |
| 1 | student |
| 1 | editingteacher |
Scenario Outline: An administrator should always be allowed to join a meeting
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | role:editingteacher |
| wait | <wait> |
When I am on the "Room recordings" Activity page logged in as admin
Then "Join session" "link" should exist
Examples:
| wait |
| 0 |
| 1 |
Scenario Outline: A student moderator should be able to start a meeting
Given the following course exists:
| name | Test course |
| shortname | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | C1 | student |
And the following "activity" exists:
| course | C1 |
| activity | bigbluebuttonbn |
| name | Room recordings |
| idnumber | Room recordings |
| moderators | <moderators> |
| wait | <wait> |
When I am on the "Room recordings" Activity page logged in as traverst
Then "Join session" "link" should exist
Examples:
| wait | moderators |
| 0 | user:traverst |
| 1 | user:traverst |
| 0 | role:student |
| 1 | role:student |
@@ -0,0 +1,89 @@
@mod @mod_bigbluebuttonbn @with_bbbext_simple
Feature: BigBlueButtonBN Subplugins test
As a BigBlueButtonBN user
I can list the subplugins the admin settings pages
I can see the additional settings coming from the subplugins in the edit form
Background: Make sure that the BigBlueButtonBN plugin is enabled
Given I enable "bigbluebuttonbn" "mod" plugin
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Test course | Test course | 0 | 1 |
And the following "activities" exist:
| activity | course | name | type |
| bigbluebuttonbn | Test course | BBB Instance name | 0 |
And the following config values are set as admin:
| enableasyncbackup | 0 |
Scenario: Add a subplugin and check that the settings are available
Given I log in as "admin"
When I navigate to "Plugins > Activity modules > BigBlueButton > Manage BigBlueButton extension plugins" in site administration
Then I should see "Simple"
Scenario: I check that new fields are available and editable in the instance edit form
Given I am on the "BBB Instance name" "bigbluebuttonbn activity editing" page logged in as "admin"
When I expand all fieldsets
Then I should see "New field"
@javascript
Scenario: I check that new fields are available and when I edit the field the value is saved
Given I am on the "BBB Instance name" "bigbluebuttonbn activity editing" page logged in as "admin"
And I expand all fieldsets
And I press "Save and display"
And I expand all fieldsets
And I should see "New field cannot be empty"
And I set the field "New field" to "50"
And I press "Save and display"
And I am on the "BBB Instance name" "bigbluebuttonbn activity editing" page
When I expand all fieldsets
Then the following fields match these values:
| New field | 50 |
Scenario: I check that new fields are not available when subplugin is disabled
Given I log in as "admin"
And I navigate to "Plugins > Activity modules > BigBlueButton > Manage BigBlueButton extension plugins" in site administration
And I click on "Disable" "link"
And I am on the "BBB Instance name" "bigbluebuttonbn activity editing" page
When I expand all fieldsets
Then I should not see "New field"
@javascript
Scenario: I check that custom completion with subplugin works
Given a BigBlueButton mock server is configured
And the following config values are set as admin:
| bigbluebuttonbn_meetingevents_enabled | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| traverst | Terry | Travers | t.travers@example.com |
And the following "course enrolments" exist:
| user | course | role |
| traverst | Test course | student |
And I am on the "BBB Instance name" "bigbluebuttonbn activity editing" page logged in as "admin"
And I expand all fieldsets
And I set the following fields to these values:
| Add requirements | 1 |
| Raise hand twice | 1 |
And I set the field "New field" to "50"
And I press "Save and display"
# We start the meeting here so to make sure that meta_analytics-callback-url is set.
And the following "mod_bigbluebuttonbn > meeting" exists:
| activity | BBB Instance name |
And I log out
And I am on the "BBB Instance name" "bigbluebuttonbn activity" page logged in as "traverst"
And I click on "Join session" "link"
And I switch to "bigbluebutton_conference" window
And I wait until the page is ready
And I follow "End Meeting"
And the BigBlueButtonBN server has received the following events from user "traverst":
| instancename | eventtype | eventdata |
| BBB Instance name | raisehand | 1 |
| BBB Instance name | raisehand | 1 |
# Selenium driver does not like the click action to be done before we
# automatically close the window so we need to make sure that the window
# is closed before.
And I close all opened windows
And I switch to the main window
And the BigBlueButtonBN activity "BBB Instance name" has sent recording all its events
And I run all adhoc tasks
When I reload the page
Then I should see "Done: Raise hand twice in a meeting."