Correctly leave the room (not the call) in integration tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2018-03-28 11:41:24 +02:00
Родитель 77c01f4ce9
Коммит dcc5e96512
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
9 изменённых файлов: 38 добавлений и 38 удалений

Просмотреть файл

@ -765,7 +765,7 @@ class RoomController extends OCSController {
$participant = $room->getParticipant($this->userId);
} catch (RoomNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
} catch (\RuntimeException $e) {
} catch (ParticipantNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}

Просмотреть файл

@ -203,7 +203,7 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
* @Then /^user "([^"]*)" exits room "([^"]*)" with (\d+)$/
* @Then /^user "([^"]*)" leaves room "([^"]*)" with (\d+)$/
*
* @param string $user
* @param string $identifier
@ -216,7 +216,7 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
* @Then /^user "([^"]*)" leaves room "([^"]*)" with (\d+)$/
* @Then /^user "([^"]*)" removes themselves from room "([^"]*)" with (\d+)$/
*
* @param string $user
* @param string $identifier

Просмотреть файл

@ -36,13 +36,13 @@ Feature: callapi/group
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant2" sees 1 peers in call "room" with 200
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant2" sees 1 peers in call "room" with 200
Then user "participant2" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant2" sees 0 peers in call "room" with 200
Then user "participant2" exits room "room" with 200
Then user "participant2" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant2" sees 0 peers in call "room" with 200
@ -71,7 +71,7 @@ Feature: callapi/group
Then user "participant3" leaves call "room" with 404
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant3" exits room "room" with 200
Then user "participant3" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
@ -100,7 +100,7 @@ Feature: callapi/group
Then user "guest" leaves call "room" with 404
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "guest" exits room "room" with 200
Then user "guest" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200

Просмотреть файл

@ -34,13 +34,13 @@ Feature: callapi/one-to-one
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant2" sees 1 peers in call "room" with 200
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant2" sees 1 peers in call "room" with 200
Then user "participant2" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant2" sees 0 peers in call "room" with 200
Then user "participant2" exits room "room" with 200
Then user "participant2" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant2" sees 0 peers in call "room" with 200
@ -69,13 +69,13 @@ Feature: callapi/one-to-one
Then user "participant3" leaves call "room" with 404
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant3" exits room "room" with 200
Then user "participant3" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
@ -103,12 +103,12 @@ Feature: callapi/one-to-one
Then user "guest" leaves call "room" with 404
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "guest" exits room "room" with 200
Then user "guest" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404

Просмотреть файл

@ -65,13 +65,13 @@ Feature: callapi/public
Then user "participant3" leaves call "room" with 404
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant3" exits room "room" with 200
Then user "participant3" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
@ -102,13 +102,13 @@ Feature: callapi/public
Then user "participant3" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 1 peers in call "room" with 200
Then user "participant3" exits room "room" with 200
Then user "participant3" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
@ -167,12 +167,12 @@ Feature: callapi/public
Then user "guest" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 1 peers in call "room" with 200
Then user "guest" exits room "room" with 200
Then user "guest" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404

Просмотреть файл

@ -34,13 +34,13 @@ Feature: callapi/public
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant2" sees 1 peers in call "room" with 200
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant2" sees 1 peers in call "room" with 200
Then user "participant2" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant2" sees 0 peers in call "room" with 200
Then user "participant2" exits room "room" with 200
Then user "participant2" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant2" sees 0 peers in call "room" with 200
@ -69,13 +69,13 @@ Feature: callapi/public
Then user "participant3" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 1 peers in call "room" with 200
Then user "participant3" exits room "room" with 200
Then user "participant3" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "participant3" sees 0 peers in call "room" with 404
@ -103,12 +103,12 @@ Feature: callapi/public
Then user "guest" leaves call "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 1 peers in call "room" with 200
Then user "guest" exits room "room" with 200
Then user "guest" leaves room "room" with 200
Then user "participant1" sees 1 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" leaves call "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404
Then user "participant1" exits room "room" with 200
Then user "participant1" leaves room "room" with 200
Then user "participant1" sees 0 peers in call "room" with 200
And user "guest" sees 0 peers in call "room" with 404

Просмотреть файл

@ -35,7 +35,7 @@ Feature: one-to-one
| invite | participant2 |
And user "participant1" is participant of room "room2"
And user "participant2" is participant of room "room2"
When user "participant1" leaves room "room2" with 200
When user "participant1" removes themselves from room "room2" with 200
Then user "participant1" is not participant of room "room2"
And user "participant2" is not participant of room "room2"

Просмотреть файл

@ -4,7 +4,7 @@ Feature: public
Given user "participant2" exists
Given user "participant3" exists
Scenario: Owner leaves
Scenario: Owner removes the room from their room list
Given user "participant1" creates room "room"
| roomType | 3 |
Then user "participant1" is participant of the following rooms
@ -12,10 +12,10 @@ Feature: public
| room | 3 | 1 | participant1-displayname |
And user "participant2" is not participant of room "room"
And user "participant3" is not participant of room "room"
When user "participant1" leaves room "room" with 200
When user "participant1" removes themselves from room "room" with 200
Then user "participant1" is not participant of room "room"
Scenario: Moderator leaves
Scenario: Moderator removes the room from their room list
Given user "participant1" creates room "room"
| roomType | 3 |
And user "participant1" adds "participant2" to room "room" with 200
@ -25,11 +25,11 @@ Feature: public
| room | 3 | 2 | participant1-displayname, participant2-displayname |
And user "participant1" is participant of room "room"
And user "participant2" is participant of room "room"
When user "participant2" leaves room "room" with 200
When user "participant2" removes themselves from room "room" with 200
Then user "participant1" is participant of room "room"
And user "participant2" is not participant of room "room"
Scenario: User leaves
Scenario: User removes the room from their room list
Given user "participant1" creates room "room"
| roomType | 3 |
And user "participant1" adds "participant2" to room "room" with 200
@ -38,15 +38,15 @@ Feature: public
| room | 3 | 3 | participant1-displayname, participant2-displayname |
And user "participant1" is participant of room "room"
And user "participant2" is participant of room "room"
When user "participant2" leaves room "room" with 200
When user "participant2" removes themselves from room "room" with 200
Then user "participant1" is participant of room "room"
And user "participant2" is not participant of room "room"
Scenario: Stranger leaves
Scenario: Stranger removes the room from their room list
Given user "participant1" creates room "room"
| roomType | 3 |
And user "participant1" is participant of room "room"
And user "participant2" is not participant of room "room"
When user "participant2" leaves room "room" with 404
When user "participant2" removes themselves from room "room" with 404
Then user "participant1" is participant of room "room"
And user "participant2" is not participant of room "room"

Просмотреть файл

@ -43,12 +43,12 @@ Feature: public
And user "participant1" adds "participant2" to room "room" with 200
When user "participant2" sets password "foobar" for room "room" with 403
Then user "participant3" joins room "room" with 200
And user "participant3" leaves call "room" with 200
And user "participant3" leaves room "room" with 200
When user "participant1" sets password "foobar" for room "room" with 200
Then user "participant3" joins room "room" with 403
Then user "participant3" joins room "room" with 200
| password | foobar |
And user "participant3" leaves call "room" with 200
And user "participant3" leaves room "room" with 200
When user "participant2" sets password "" for room "room" with 403
Then user "participant3" joins room "room" with 403
@ -60,11 +60,11 @@ Feature: public
| room | 3 | 1 | participant1-displayname |
When user "participant2" sets password "foobar" for room "room" with 404
Then user "participant3" joins room "room" with 200
And user "participant3" leaves call "room" with 200
And user "participant3" leaves room "room" with 200
When user "participant1" sets password "foobar" for room "room" with 200
Then user "participant3" joins room "room" with 403
Then user "participant3" joins room "room" with 200
| password | foobar |
And user "participant3" leaves call "room" with 200
And user "participant3" leaves room "room" with 200
When user "participant2" sets password "" for room "room" with 404
Then user "participant3" joins room "room" with 403