Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
behat_mod_bigbluebuttonbn Class Reference

Behat custom steps and configuration for mod_bigbluebuttonbn. More...

Inheritance diagram for behat_mod_bigbluebuttonbn:
behat_base behat_session_interface

Public Member Functions

 before_scenario (BeforeScenarioScope $scope)
 BeforeScenario hook to reset the remote testpoint.
 
 getSession ($name=null)
 Returns the Mink session.
 
 i_accept_dpa_and_enable_bigbluebuttonbn_plugin ()
 Accept dpa and enable bigbluebuttonbn plugin.
 
 install_simple_subplugin ()
 Install the simple subplugin.
 
 mock_is_configured ()
 Check that the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER is defined, so we can connect to the mock server.
 
 trigger_all_events (string $instancename)
 Send all events received for this meeting back to moodle.
 
 trigger_meeting_event (string $username, TableNode $data)
 Trigger a meeting event on BBB side.
 
 trigger_recording_ready_notification ()
 Trigger a recording ready notification on BBB side.
 
 uninstall_simple_subplugin ()
 Uninstall the simple subplugin.
 

Static Public Member Functions

static get_exact_named_selectors ()
 Return the list of exact named selectors.
 
static get_mocked_server_url (string $endpoint='', array $params=[])
 Retrieve the mock server URL from the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER definition.
 

Public Attributes

const PAGE_READY_JS
 The JS code to check that the page is ready.
 

Protected Member Functions

 get_course_id (string $identifier)
 Get course id from its identifier (shortname or fullname or idnumber)
 
 resolve_page_instance_url (string $type, string $identifier)
 Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'.
 
 resolve_page_url (string $page)
 Convert page names to URLs for steps like 'When I am on the "[page name]" page'.
 
 send_mock_request (string $endpoint, array $params=[])
 Send a query to the mock server.
 

Protected Attributes

array $installedsubplugins = []
 List of installed subplugins.
 

Detailed Description

Behat custom steps and configuration for mod_bigbluebuttonbn.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ before_scenario()

behat_mod_bigbluebuttonbn::before_scenario ( BeforeScenarioScope $scope)

BeforeScenario hook to reset the remote testpoint.

@BeforeScenario @mod_bigbluebuttonbn

Parameters
BeforeScenarioScope$scope

◆ get_course_id()

behat_mod_bigbluebuttonbn::get_course_id ( string $identifier)
protected

Get course id from its identifier (shortname or fullname or idnumber)

Parameters
string$identifier
Return values
int

◆ get_exact_named_selectors()

static behat_mod_bigbluebuttonbn::get_exact_named_selectors ( )
static

Return the list of exact named selectors.

Return values
array

◆ get_mocked_server_url()

static behat_mod_bigbluebuttonbn::get_mocked_server_url ( string $endpoint = '',
array $params = [] )
static

Retrieve the mock server URL from the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER definition.

Parameters
string$endpoint
array$params
Return values
moodle_url

◆ getSession()

behat_session_interface::getSession ( $name = null)
inherited

Returns the Mink session.

Parameters
string | null$namename of the session OR active session will be used
Return values
Behat\Mink\Session

Implemented in behat_form_field.

◆ i_accept_dpa_and_enable_bigbluebuttonbn_plugin()

behat_mod_bigbluebuttonbn::i_accept_dpa_and_enable_bigbluebuttonbn_plugin ( )

Accept dpa and enable bigbluebuttonbn plugin.

@When /^I accept dpa and enable bigbluebuttonbn plugin$/

◆ install_simple_subplugin()

behat_mod_bigbluebuttonbn::install_simple_subplugin ( )

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

◆ mock_is_configured()

behat_mod_bigbluebuttonbn::mock_is_configured ( )

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$/

◆ resolve_page_instance_url()

behat_mod_bigbluebuttonbn::resolve_page_instance_url ( string $type,
string $identifier )
protected

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) |

Parameters
string$typeidentifies which type of page this is, e.g. 'Indez'.
string$identifieridentifies the particular page, e.g. 'Mathematics 101'.
Return values
moodle_urlthe corresponding URL.
Exceptions
Exceptionwith a meaningful error message if the specified page cannot be found.

◆ resolve_page_url()

behat_mod_bigbluebuttonbn::resolve_page_url ( string $page)
protected

Convert page names to URLs for steps like 'When I am on the "[page name]" page'.

Recognised page names are: | None so far! | |

Parameters
string$pagename of the page, with the component name removed e.g. 'Admin notification'.
Return values
moodle_urlthe corresponding URL.
Exceptions
Exceptionwith a meaningful error message if the specified page cannot be found.

◆ send_mock_request()

behat_mod_bigbluebuttonbn::send_mock_request ( string $endpoint,
array $params = [] )
protected

Send a query to the mock server.

Parameters
string$endpoint
array$params

◆ trigger_all_events()

behat_mod_bigbluebuttonbn::trigger_all_events ( string $instancename)

Send all events received for this meeting back to moodle.

@Given /^the BigBlueButtonBN activity "(?P<element_string>(?:[^"]|::")*)" has sent recording all its events$/

Parameters
string$instancename

◆ trigger_meeting_event()

behat_mod_bigbluebuttonbn::trigger_meeting_event ( string $username,
TableNode $data )

Trigger a meeting event on BBB side.

@Given /^the BigBlueButtonBN server has received the following events from user "(?P<element_string>(?:[^"]|::")*)":$/

Parameters
string$username
TableNode$data

◆ trigger_recording_ready_notification()

behat_mod_bigbluebuttonbn::trigger_recording_ready_notification ( )

Trigger a recording ready notification on BBB side.

@Given the BigBlueButtonBN server has sent recording ready notifications

◆ uninstall_simple_subplugin()

behat_mod_bigbluebuttonbn::uninstall_simple_subplugin ( )

Uninstall the simple subplugin.

@AfterScenario @with_bbbext_simple

Member Data Documentation

◆ PAGE_READY_JS

const behat_session_interface::PAGE_READY_JS
inherited
Initial value:
= "document.readyState === 'complete' && " .
"(typeof M !== 'object' || typeof M.util !== 'object' || " .
"typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"

The JS code to check that the page is ready.

The document must be complete and either M.util.pending_js must be empty, or it must not be defined at all.


The documentation for this class was generated from the following file: