Skip to content

Commit

Permalink
Move conversation creation to v4
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Mar 3, 2021
1 parent e858ec6 commit d7507e5
Show file tree
Hide file tree
Showing 50 changed files with 482 additions and 482 deletions.
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
'url' => '/api/{apiVersion}/room',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
],
],
[
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,27 +487,27 @@ private function guestIsParticipantOfRoom($guest, $isOrNotParticipant, $identifi
}

/**
* @Then /^user "([^"]*)" creates room "([^"]*)"(?: \((v(1|2|3))\))?$/
* @Then /^user "([^"]*)" creates room "([^"]*)" \((v4)\)$/
*
* @param string $user
* @param string $identifier
* @param string $apiVersion
* @param TableNode|null $formData
*/
public function userCreatesRoom($user, $identifier, $apiVersion = 'v1', TableNode $formData = null) {
public function userCreatesRoom(string $user, string $identifier, string $apiVersion, TableNode $formData = null) {
$this->userCreatesRoomWith($user, $identifier, 201, $apiVersion, $formData);
}

/**
* @Then /^user "([^"]*)" creates room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/
* @Then /^user "([^"]*)" creates room "([^"]*)" with (\d+) \((v4)\)$/
*
* @param string $user
* @param string $identifier
* @param int $statusCode
* @param string $apiVersion
* @param TableNode|null $formData
*/
public function userCreatesRoomWith($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null) {
public function userCreatesRoomWith(string $user, string $identifier, int $statusCode, string $apiVersion = 'v1', TableNode $formData = null) {
$this->setCurrentUser($user);
$this->sendRequest('POST', '/apps/spreed/api/' . $apiVersion . '/room', $formData);
$this->assertStatusCode($this->response, $statusCode);
Expand All @@ -521,14 +521,14 @@ public function userCreatesRoomWith($user, $identifier, $statusCode, $apiVersion
}

/**
* @Then /^user "([^"]*)" tries to create room with (\d+)(?: \((v(1|2|3))\))?$/
* @Then /^user "([^"]*)" tries to create room with (\d+) \((v4)\)$/
*
* @param string $user
* @param int $statusCode
* @param string $apiVersion
* @param TableNode|null $formData
*/
public function userTriesToCreateRoom($user, $statusCode, $apiVersion = 'v1', TableNode $formData = null) {
public function userTriesToCreateRoom(string $user, int $statusCode, string $apiVersion = 'v1', TableNode $formData = null) {
$this->setCurrentUser($user);
$this->sendRequest('POST', '/apps/spreed/api/' . $apiVersion . '/room', $formData);
$this->assertStatusCode($this->response, $statusCode);
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/features/callapi/group-read-only.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: callapi/group-read-only
And user "participant2" is member of group "attendees1"

Scenario: User1 invites group attendees1 to a group room and they cant join the call in a locked conversation
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| invite | attendees1 |
Then user "participant1" is participant of room "room"
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/features/callapi/group.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: callapi/group
Then user "participant3" is participant of the following rooms

Scenario: User1 invites group attendees1 to a group room and they can do everything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| invite | attendees1 |
Then user "participant1" is participant of room "room"
Expand Down Expand Up @@ -52,7 +52,7 @@ Feature: callapi/group
And user "participant2" sees 0 peers in call "room" with 200

Scenario: User1 invites group attendees1 to a group room and user3 can't do anything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| invite | attendees1 |
Then user "participant1" is participant of room "room"
Expand Down Expand Up @@ -81,7 +81,7 @@ Feature: callapi/group
And user "participant3" sees 0 peers in call "room" with 404

Scenario: User1 invites group attendees1 to a group room and guest can't do anything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| invite | attendees1 |
Then user "participant1" is participant of room "room"
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/features/callapi/one-to-one.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: callapi/one-to-one
Then user "participant3" is participant of the following rooms

Scenario: User1 invites user2 to a one2one room and they can do everything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 1 |
| invite | participant2 |
Then user "participant1" is participant of room "room"
Expand Down Expand Up @@ -43,7 +43,7 @@ Feature: callapi/one-to-one
And user "participant2" sees 0 peers in call "room" with 200

Scenario: User1 invites user2 to a one2one room and user3 can't do anything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 1 |
| invite | participant2 |
Then user "participant1" is participant of room "room"
Expand Down Expand Up @@ -75,7 +75,7 @@ Feature: callapi/one-to-one
And user "participant3" sees 0 peers in call "room" with 404

Scenario: User1 invites user2 to a one2one room and guest can't do anything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 1 |
| invite | participant2 |
Then user "participant1" is participant of room "room"
Expand Down Expand Up @@ -106,7 +106,7 @@ Feature: callapi/one-to-one
And user "guest" sees 0 peers in call "room" with 404

Scenario: Sending a message into a one-to-one chat re-adds the participants
Given user "participant1" creates room "room"
Given user "participant1" creates room "room" (v4)
| roomType | 1 |
| invite | participant2 |
And user "participant1" is participant of room "room"
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/features/callapi/password.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: callapi/public
Then user "participant3" is participant of the following rooms

Scenario: User1 invites user2 to a public room and they can do everything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "room" with 200
Expand Down Expand Up @@ -39,7 +39,7 @@ Feature: callapi/public
And user "participant2" sees 0 peers in call "room" with 200

Scenario: User1 invites user2 to a public room and user3 can not join without password
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "room" with 200
Expand Down Expand Up @@ -73,7 +73,7 @@ Feature: callapi/public
And user "participant3" sees 0 peers in call "room" with 404

Scenario: User1 invites user2 to a public room and user3 can join with password
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "room" with 200
Expand Down Expand Up @@ -108,7 +108,7 @@ Feature: callapi/public
And user "participant3" sees 0 peers in call "room" with 404

Scenario: User1 invites user2 to a public room and guest can not join without password
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "room" with 200
Expand All @@ -135,7 +135,7 @@ Feature: callapi/public
And user "guest" sees 0 peers in call "room" with 404

Scenario: User1 invites user2 to a public room and guest can join with password
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "room" with 200
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/features/callapi/public-read-only.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: callapi/public-read-only
And user "participant3" exists

Scenario: User1 invites user2 to a public room and they cant join the call in a locked conversation
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds "participant2" to room "room" with 200
Expand All @@ -27,7 +27,7 @@ Feature: callapi/public-read-only
And user "participant2" sees 2 peers in call "room" with 200

Scenario: User1 invites user2 to a public room and user3 cant join the call in a locked conversation
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds "participant2" to room "room" with 200
Expand All @@ -47,7 +47,7 @@ Feature: callapi/public-read-only
And user "participant3" sees 2 peers in call "room" with 200

Scenario: User1 invites user2 to a public room and guest cant join the call in a locked conversation
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds "participant2" to room "room" with 200
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/features/callapi/public.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: callapi/public
Then user "participant3" is participant of the following rooms

Scenario: User1 invites user2 to a public room and they can do everything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds "participant2" to room "room" with 200
Expand Down Expand Up @@ -44,7 +44,7 @@ Feature: callapi/public
And user "participant2" sees 0 peers in call "room" with 200

Scenario: User1 invites user2 to a public room and user3 can do everything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds "participant2" to room "room" with 200
Expand Down Expand Up @@ -77,7 +77,7 @@ Feature: callapi/public
And user "participant3" sees 0 peers in call "room" with 404

Scenario: User1 invites user2 to a public room and guest can do everything
When user "participant1" creates room "room"
When user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds "participant2" to room "room" with 200
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/features/chat/commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: chat/commands
Given user "participant2" exists

Scenario: user can see own help command and others can not
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds "participant2" to room "group room" with 200
Expand All @@ -15,7 +15,7 @@ Feature: chat/commands
And user "participant2" sees the following messages in room "group room" with 200

Scenario: user can see own help command along with regular messages and others can not
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds "participant2" to room "group room" with 200
Expand All @@ -33,7 +33,7 @@ Feature: chat/commands
| group room | users | participant1 | participant1-displayname | Message 1 | [] |

Scenario: double slash escapes a command for everyone
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds "participant2" to room "group room" with 200
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/features/chat/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: chat/reply
Given user "participant2" exists

Scenario: moderator deletes their own message
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200
Expand All @@ -26,7 +26,7 @@ Feature: chat/reply
Then user "participant2" received a system messages in room "group room" to delete "Message 1"

Scenario: user deletes their own message
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200
Expand All @@ -48,7 +48,7 @@ Feature: chat/reply
Then user "participant2" received a system messages in room "group room" to delete "Message 1"

Scenario: moderator deletes other user message
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200
Expand All @@ -67,7 +67,7 @@ Feature: chat/reply
Then user "participant2" received a system messages in room "group room" to delete "Message 1"

Scenario: moderator deletes their own message which got replies
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200
Expand All @@ -94,7 +94,7 @@ Feature: chat/reply
Then user "participant2" received a system messages in room "group room" to delete "Message 1"

Scenario: user deletes their own message which got replies
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200
Expand All @@ -121,7 +121,7 @@ Feature: chat/reply
Then user "participant2" received a system messages in room "group room" to delete "Message 1"

Scenario: moderator deletes other user message
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/features/chat/group-read-only.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: chat/group-read-only
And user "participant2" is member of group "attendees1"

Scenario: owner can send and receive chat messages to and from group room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant1" sends message "Message 1" to room "group room" with 201
Expand All @@ -27,7 +27,7 @@ Feature: chat/group-read-only
| group room | users | participant1 | participant1-displayname | Message 1 | [] |

Scenario: invited user can send and receive chat messages to and from group room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant2" sends message "Message 1" to room "group room" with 201
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/features/chat/group.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: chat/group
And user "participant2" is member of group "attendees1"

Scenario: owner can send and receive chat messages to and from group room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant1" sends message "Message 1" to room "group room" with 201
Expand All @@ -16,7 +16,7 @@ Feature: chat/group
| group room | users | participant1 | participant1-displayname | Message 1 | [] |

Scenario: invited user can send and receive chat messages to and from group room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant2" sends message "Message 1" to room "group room" with 201
Expand All @@ -25,15 +25,15 @@ Feature: chat/group
| group room | users | participant2 | participant2-displayname | Message 1 | [] |

Scenario: not invited user can not send nor receive chat messages to nor from group room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant3" sends message "Message 1" to room "group room" with 404
And user "participant1" sends message "Message 2" to room "group room" with 201
Then user "participant3" sees the following messages in room "group room" with 404

Scenario: guest can not send nor receive chat messages to nor from group room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
And user "guest" joins call "group room" with 404
Expand All @@ -42,7 +42,7 @@ Feature: chat/group
Then user "guest" sees the following messages in room "group room" with 404

Scenario: everyone in a group room can receive messages from everyone in that room
Given user "participant1" creates room "group room"
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant1" sends message "Message 1" to room "group room" with 201
Expand Down
Loading

0 comments on commit d7507e5

Please sign in to comment.