summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-01-18 12:55:40 +0100
committerJoas Schilling <coding@schilljs.com>2024-01-19 14:56:56 +0100
commit7dfdcb4dfbbbfe18f6fcafebc79de5f46e4fff2e (patch)
tree35759c05910319395b8bff16d6207ef425e2f298 /tests/integration
parent5751ab8e9a4922317c12281c33037e61b0ac6b6d (diff)
fix(breakout): Add integration test for reseting the breakout status on the parent
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php14
-rw-r--r--tests/integration/features/conversation-1/breakout-rooms.feature34
2 files changed, 48 insertions, 0 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index 460c76e1c..a7ea3a280 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -2927,6 +2927,20 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
+ * @Then /^user "([^"]*)" removes breakout rooms from "([^"]*)" with (\d+) \((v1)\)$/
+ *
+ * @param string $user
+ * @param string $identifier
+ * @param int $status
+ * @param string $apiVersion
+ */
+ public function userRemovesBreakoutRooms(string $user, string $identifier, int $status, string $apiVersion): void {
+ $this->setCurrentUser($user);
+ $this->sendRequest('DELETE', '/apps/spreed/api/' . $apiVersion . '/breakout-rooms/' . self::$identifierToToken[$identifier]);
+ $this->assertStatusCode($this->response, $status);
+ }
+
+ /**
* @Then /^user "([^"]*)" moves participants into different breakout rooms for "([^"]*)" with (\d+) \((v1)\)$/
*
* @param string $user
diff --git a/tests/integration/features/conversation-1/breakout-rooms.feature b/tests/integration/features/conversation-1/breakout-rooms.feature
index 01932206a..05a7aa4d7 100644
--- a/tests/integration/features/conversation-1/breakout-rooms.feature
+++ b/tests/integration/features/conversation-1/breakout-rooms.feature
@@ -575,6 +575,40 @@ Feature: conversation/breakout-rooms
And user "participant1" is participant of the following rooms (v4)
And user "participant2" is participant of the following rooms (v4)
+ Scenario: Removing breakout rooms also stops them on the parent
+ Given user "participant1" creates room "class room" (v4)
+ | roomType | 2 |
+ | roomName | class room |
+ And user "participant1" adds user "participant2" to room "class room" with 200 (v4)
+ And user "participant1" sees the following attendees in room "class room" with 200 (v4)
+ | actorType | actorId | participantType |
+ | users | participant1 | 1 |
+ | users | participant2 | 3 |
+ And user "participant1" is participant of the following unordered rooms (v4)
+ | type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
+ | 2 | class room | 0 | 0 | 0 |
+ And user "participant1" creates 2 automatic breakout rooms for "class room" with 200 (v1)
+ | users::participant2 | 0 |
+ And user "participant1" is participant of the following unordered rooms (v4)
+ | type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
+ | 2 | class room | 0 | 1 | 0 |
+ | 2 | Room 1 | 1 | 0 | 0 |
+ | 2 | Room 2 | 1 | 0 | 0 |
+ And user "participant1" starts breakout rooms in room "class room" with 200 (v1)
+ And user "participant1" is participant of the following unordered rooms (v4)
+ | type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
+ | 2 | class room | 0 | 1 | 1 |
+ | 2 | Room 1 | 0 | 0 | 0 |
+ | 2 | Room 2 | 0 | 0 | 0 |
+ And user "participant2" is participant of the following unordered rooms (v4)
+ | type | name |
+ | 2 | class room |
+ | 2 | Room 1 |
+ When user "participant1" removes breakout rooms from "class room" with 200 (v1)
+ And user "participant1" is participant of the following unordered rooms (v4)
+ | type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
+ | 2 | class room | 0 | 0 | 0 |
+
Scenario: Deleting a single breakout room unassigned the students from the mapping
Given user "participant1" creates room "class room" (v4)
| roomType | 2 |