From 889290257d9a93ad2b9bed634f17f0ac38d5e78c Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 2 Mar 2023 09:06:27 +0800 Subject: [PATCH] MDL-77460 behat: improve roles.feature test --- mod/bigbluebuttonbn/tests/behat/roles.feature | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/mod/bigbluebuttonbn/tests/behat/roles.feature b/mod/bigbluebuttonbn/tests/behat/roles.feature index b1efd443797..a6eace3731d 100644 --- a/mod/bigbluebuttonbn/tests/behat/roles.feature +++ b/mod/bigbluebuttonbn/tests/behat/roles.feature @@ -1,28 +1,25 @@ @mod @mod_bigbluebuttonbn @javascript -Feature: Bigbluebuttonbn rooms - When a meeting is created, roles for each type of participant can be changed +Feature: Set role as Bigbluebuttonbn moderator + In order to set a room moderator + As admin + I need to see the list of roles - Background: Make sure that a course is created + Background: Given I enable "bigbluebuttonbn" "mod" plugin - 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 | - And the following "course enrolments" exist: - | user | course | role | - | traverst | C1 | student | - 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 "course" exist: + | fullname | shortname | + | Course 1 | C1 | + And the following "activity" exists: + | course | C1 | + | activity | bigbluebuttonbn | + | name | RoomRecordings | - Scenario: Add a mod_bigbluebuttonbn instance and set the teacher role as moderator - When I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin" - Then I set the field "bigbluebuttonbn_participant_selection_type" to "Role" - Then I set the field "bigbluebuttonbn_participant_selection" to "Manager" - Then I click on "bigbluebuttonbn_participant_selection_add" "button" - Then I set the field "select-for-role-1" to "Moderator" - Then I press "Save and display" - Then I am on the "RoomRecordings" "bigbluebuttonbn activity editing" page logged in as "admin" - And "[name=select-for-role-1] option[value=moderator][selected]" "css_element" should exist + 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