From 7c1c1071e769430362e7a3d5c94cd22d110d682a Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 23 Mar 2023 09:44:46 +0800 Subject: [PATCH] MDL-77561 behat: add step to accept dpa and enable bigbluebutton The step i_enable_plugin cannot be used as bigbluebuttonbn_default_dpa_accepted setting needs to be enable in order for the BigBlueButton plugin to be enabled. --- mod/bigbluebuttonbn/tests/behat/add_instance.feature | 2 +- .../tests/behat/behat_mod_bigbluebuttonbn.php | 10 ++++++++++ mod/bigbluebuttonbn/tests/behat/completion.feature | 2 +- mod/bigbluebuttonbn/tests/behat/edit_instance.feature | 2 +- mod/bigbluebuttonbn/tests/behat/end_meeting.feature | 2 +- mod/bigbluebuttonbn/tests/behat/group_mode.feature | 2 +- mod/bigbluebuttonbn/tests/behat/guest_access.feature | 2 +- mod/bigbluebuttonbn/tests/behat/join_meeting.feature | 2 +- .../tests/behat/join_meeting_as_guest.feature | 2 +- mod/bigbluebuttonbn/tests/behat/lock_settings.feature | 2 +- mod/bigbluebuttonbn/tests/behat/meeting_roles.feature | 2 +- mod/bigbluebuttonbn/tests/behat/recordings.feature | 2 +- .../tests/behat/recordings_import.feature | 2 +- mod/bigbluebuttonbn/tests/behat/roles.feature | 2 +- mod/bigbluebuttonbn/tests/behat/room.feature | 2 +- mod/bigbluebuttonbn/tests/behat/start_meeting.feature | 2 +- 16 files changed, 25 insertions(+), 15 deletions(-) diff --git a/mod/bigbluebuttonbn/tests/behat/add_instance.feature b/mod/bigbluebuttonbn/tests/behat/add_instance.feature index 6483591e2e6..a691db60590 100644 --- a/mod/bigbluebuttonbn/tests/behat/add_instance.feature +++ b/mod/bigbluebuttonbn/tests/behat/add_instance.feature @@ -6,7 +6,7 @@ Feature: bigbluebuttonbn instance Background: Make sure that a course is created Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | | Test course | Test course | 0 | diff --git a/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php b/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php index 84c6b7d43b6..d0b650ed781 100644 --- a/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php +++ b/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php @@ -52,6 +52,16 @@ class behat_mod_bigbluebuttonbn extends behat_base { } } + /** + * Accept dpa and enable bigbluebuttonbn plugin. + * + * @When /^I accept dpa and enable bigbluebuttonbn plugin$/ + */ + public function i_accept_dpa_and_enable_bigbluebuttonbn_plugin(): void { + set_config('bigbluebuttonbn_default_dpa_accepted', true); + $this->execute('behat_general::i_enable_plugin', ['bigbluebuttonbn', 'mod']); + } + /** * Check that the TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER is defined, so we can connect to the mock server. * diff --git a/mod/bigbluebuttonbn/tests/behat/completion.feature b/mod/bigbluebuttonbn/tests/behat/completion.feature index 72ed08089ae..9235cca7fef 100644 --- a/mod/bigbluebuttonbn/tests/behat/completion.feature +++ b/mod/bigbluebuttonbn/tests/behat/completion.feature @@ -3,7 +3,7 @@ Feature: As a user I can complete a BigblueButtonBN activity by usual or custom Background: Make sure that a course is created Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | enablecompletion | | Test course | C1 | 0 | 1 | diff --git a/mod/bigbluebuttonbn/tests/behat/edit_instance.feature b/mod/bigbluebuttonbn/tests/behat/edit_instance.feature index b21d6432b62..1396e6ee741 100644 --- a/mod/bigbluebuttonbn/tests/behat/edit_instance.feature +++ b/mod/bigbluebuttonbn/tests/behat/edit_instance.feature @@ -4,7 +4,7 @@ Feature: I can edit a bigbluebutton instance Background: Make sure that a course is created Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin And the following config values are set as admin: | bigbluebuttonbn_voicebridge_editable | 1 | And the following "courses" exist: diff --git a/mod/bigbluebuttonbn/tests/behat/end_meeting.feature b/mod/bigbluebuttonbn/tests/behat/end_meeting.feature index 7a6d91a5db3..8090997a61b 100644 --- a/mod/bigbluebuttonbn/tests/behat/end_meeting.feature +++ b/mod/bigbluebuttonbn/tests/behat/end_meeting.feature @@ -6,7 +6,7 @@ Feature: Test the ability to end a meeting Background: Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin Scenario Outline: Only a BigBlueButton moderator can end a session Given the following course exists: diff --git a/mod/bigbluebuttonbn/tests/behat/group_mode.feature b/mod/bigbluebuttonbn/tests/behat/group_mode.feature index db29b385587..0f5ac66356e 100644 --- a/mod/bigbluebuttonbn/tests/behat/group_mode.feature +++ b/mod/bigbluebuttonbn/tests/behat/group_mode.feature @@ -5,7 +5,7 @@ Feature: Test the module in group mode. # 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 I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | groupmode | groupmodeforce | | Test Course 1 | C1 | 0 | 1 | 1 | diff --git a/mod/bigbluebuttonbn/tests/behat/guest_access.feature b/mod/bigbluebuttonbn/tests/behat/guest_access.feature index d1a1bfe5d9e..e6ae8c10752 100644 --- a/mod/bigbluebuttonbn/tests/behat/guest_access.feature +++ b/mod/bigbluebuttonbn/tests/behat/guest_access.feature @@ -3,7 +3,7 @@ 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 I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | | Test Course 1 | C1 | 0 | diff --git a/mod/bigbluebuttonbn/tests/behat/join_meeting.feature b/mod/bigbluebuttonbn/tests/behat/join_meeting.feature index 8516ed1ec17..6f7ccc6af8a 100644 --- a/mod/bigbluebuttonbn/tests/behat/join_meeting.feature +++ b/mod/bigbluebuttonbn/tests/behat/join_meeting.feature @@ -4,7 +4,7 @@ Feature: Test the ability to run the full meeting lifecycle (start to end) Background: Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin Scenario: Users should be able to join a meeting then end the meeting for themselves and return to the meeting page to join again. diff --git a/mod/bigbluebuttonbn/tests/behat/join_meeting_as_guest.feature b/mod/bigbluebuttonbn/tests/behat/join_meeting_as_guest.feature index 3588b496a40..14a97bb036d 100644 --- a/mod/bigbluebuttonbn/tests/behat/join_meeting_as_guest.feature +++ b/mod/bigbluebuttonbn/tests/behat/join_meeting_as_guest.feature @@ -3,7 +3,7 @@ Feature: Test the ability to run the full meeting lifecycle (start to end) for g Background: Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin And the following config values are set as admin: | bigbluebuttonbn_guestaccess_enabled | 1 | And the following course exists: diff --git a/mod/bigbluebuttonbn/tests/behat/lock_settings.feature b/mod/bigbluebuttonbn/tests/behat/lock_settings.feature index 4afff544476..f3b6d7fd3c0 100644 --- a/mod/bigbluebuttonbn/tests/behat/lock_settings.feature +++ b/mod/bigbluebuttonbn/tests/behat/lock_settings.feature @@ -6,7 +6,7 @@ Feature: Test that the meeting has the right lock setting. Background: Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin @javascript Scenario Outline: Teacher should be able to set the right lock feature in a given meeting diff --git a/mod/bigbluebuttonbn/tests/behat/meeting_roles.feature b/mod/bigbluebuttonbn/tests/behat/meeting_roles.feature index 22ef21354c6..37d0a7509a7 100644 --- a/mod/bigbluebuttonbn/tests/behat/meeting_roles.feature +++ b/mod/bigbluebuttonbn/tests/behat/meeting_roles.feature @@ -6,7 +6,7 @@ Feature: Test that meeting roles are sent to the server Background: Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn plugin @javascript Scenario Outline: Users should receive the appropriate role when joining the meeting diff --git a/mod/bigbluebuttonbn/tests/behat/recordings.feature b/mod/bigbluebuttonbn/tests/behat/recordings.feature index d516919a8bc..91ede6f5c1a 100644 --- a/mod/bigbluebuttonbn/tests/behat/recordings.feature +++ b/mod/bigbluebuttonbn/tests/behat/recordings.feature @@ -4,7 +4,7 @@ Feature: The recording can be managed through the room page 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 I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | | Test Course 1 | C1 | 0 | diff --git a/mod/bigbluebuttonbn/tests/behat/recordings_import.feature b/mod/bigbluebuttonbn/tests/behat/recordings_import.feature index e763c787c40..d5c6aaae9d7 100644 --- a/mod/bigbluebuttonbn/tests/behat/recordings_import.feature +++ b/mod/bigbluebuttonbn/tests/behat/recordings_import.feature @@ -7,7 +7,7 @@ Feature: Manage and list recordings 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 I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | | Test Course 1 | C1 | 0 | diff --git a/mod/bigbluebuttonbn/tests/behat/roles.feature b/mod/bigbluebuttonbn/tests/behat/roles.feature index a6eace3731d..9e83ca6915b 100644 --- a/mod/bigbluebuttonbn/tests/behat/roles.feature +++ b/mod/bigbluebuttonbn/tests/behat/roles.feature @@ -5,7 +5,7 @@ Feature: Set role as Bigbluebuttonbn moderator I need to see the list of roles Background: - Given I enable "bigbluebuttonbn" "mod" plugin + Given I accept dpa and enable bigbluebuttonbn plugin And the following "course" exist: | fullname | shortname | | Course 1 | C1 | diff --git a/mod/bigbluebuttonbn/tests/behat/room.feature b/mod/bigbluebuttonbn/tests/behat/room.feature index e91e19b3614..cc91c637361 100644 --- a/mod/bigbluebuttonbn/tests/behat/room.feature +++ b/mod/bigbluebuttonbn/tests/behat/room.feature @@ -3,7 +3,7 @@ Feature: The recording can be managed through the room page and as a user I can 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 I accept dpa and enable bigbluebuttonbn plugin And the following "courses" exist: | fullname | shortname | category | | Test Course 1 | C1 | 0 | diff --git a/mod/bigbluebuttonbn/tests/behat/start_meeting.feature b/mod/bigbluebuttonbn/tests/behat/start_meeting.feature index f8f2d783e3c..3b1d7cd4171 100644 --- a/mod/bigbluebuttonbn/tests/behat/start_meeting.feature +++ b/mod/bigbluebuttonbn/tests/behat/start_meeting.feature @@ -6,7 +6,7 @@ Feature: Test the ability to start a meeting Background: Given a BigBlueButton mock server is configured - And I enable "bigbluebuttonbn" "mod" plugin + And I accept dpa and enable bigbluebuttonbn 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: