mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
test: deal with new comment reponse field
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
fd1807d001
commit
abad373b40
5 changed files with 14 additions and 3 deletions
|
|
@ -317,6 +317,10 @@ trait RecordingTrait {
|
|||
usort($actualDataJson['participants']['users'], static fn (array $u1, array $u2) => $u1['userId'] <=> $u2['userId']);
|
||||
$write = true;
|
||||
}
|
||||
if (isset($actualDataJson['message']['data']['chat']['comment'])) {
|
||||
$actualDataJson['message']['data']['chat']['comment'] = [];
|
||||
$write = true;
|
||||
}
|
||||
|
||||
if ($write) {
|
||||
$actual['data'] = json_encode($actualDataJson);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Feature: callapi/recording
|
|||
And recording server sent stopped request for recording in room "room1" as "participant1" with 200
|
||||
Then signaling server received the following requests
|
||||
| token | data |
|
||||
| room1 | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true}}}} |
|
||||
| room1 | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true,"comment":[]}}}} |
|
||||
| room1 | {"type":"message","message":{"data":{"type":"recording","recording":{"status":0}}}} |
|
||||
| room1 | {"type":"update","update":{"userids":["participant1"],"properties":{"name":"Private conversation","type":2,"lobby-state":0,"lobby-timer":null,"read-only":0,"listable":0,"active-since":{"date":"ACTIVE_SINCE()","timezone_type":3,"timezone":"UTC"},"sip-enabled":0,"description":""}}} |
|
||||
Then user "participant1" sees the following system messages in room "room1" with 200 (v1)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Feature: callapi/update-call-flags
|
|||
And user "owner" joins call "public room" with 200 (v4)
|
||||
Then signaling server received the following requests
|
||||
| token | data |
|
||||
| public room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true}}}} |
|
||||
| public room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true,"comment":[]}}}} |
|
||||
| public room | {"type":"incall","incall":{"incall":7,"changed":[{"inCall":7,"lastPing":LAST_PING(),"sessionId":"SESSION(owner)","nextcloudSessionId":"SESSION(owner)","participantType":1,"participantPermissions":254,"actorType":"users","actorId":"owner","userId":"owner"}],"users":[{"inCall":7,"lastPing":LAST_PING(),"sessionId":"SESSION(owner)","nextcloudSessionId":"SESSION(owner)","participantType":1,"participantPermissions":254,"actorType":"users","actorId":"owner","userId":"owner"}]}} |
|
||||
And reset signaling server requests
|
||||
When user "owner" updates call flags in room "public room" to "1" with 200 (v4)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Feature: conversation-2/promotion-demotion
|
|||
When user "participant1" promotes "participant2" in room "room" with 200 (v4)
|
||||
Then signaling server received the following requests
|
||||
| token | data |
|
||||
| room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true}}}} |
|
||||
| room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true,"comment":[]}}}} |
|
||||
# TODO remove handler with "roomModified" in favour of handler with
|
||||
# "participantsModified" once the clients no longer expect a
|
||||
# "roomModified" message for participant type changes.
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ use OCA\Talk\Model\Message;
|
|||
use OCA\Talk\Model\Thread;
|
||||
use OCA\Talk\Room;
|
||||
use OCA\Talk\Service\ParticipantService;
|
||||
use OCA\Talk\Service\PollService;
|
||||
use OCA\Talk\Service\SessionService;
|
||||
use OCA\Talk\Service\ThreadService;
|
||||
use OCA\Talk\Signaling\BackendNotifier;
|
||||
|
|
@ -50,6 +51,9 @@ class ListenerTest extends TestCase {
|
|||
protected MessageParser&MockObject $messageParser;
|
||||
protected ThreadService&MockObject $threadService;
|
||||
protected IFactory $l10nFactory;
|
||||
protected MockObject&PollService $pollService;
|
||||
|
||||
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
@ -62,6 +66,7 @@ class ListenerTest extends TestCase {
|
|||
$this->messageParser = $this->createMock(MessageParser::class);
|
||||
$this->threadService = $this->createMock(ThreadService::class);
|
||||
$this->l10nFactory = $this->createMock(IFactory::class);
|
||||
$this->pollService = $this->createMock(PollService::class);
|
||||
|
||||
$this->listener = new Listener(
|
||||
$this->createMock(Config::class),
|
||||
|
|
@ -74,6 +79,7 @@ class ListenerTest extends TestCase {
|
|||
$this->messageParser,
|
||||
$this->threadService,
|
||||
$this->l10nFactory,
|
||||
$this->pollService,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -392,6 +398,7 @@ class ListenerTest extends TestCase {
|
|||
$this->listener->handle($event);
|
||||
}
|
||||
|
||||
|
||||
public function testSystemMessageSentEventSkippingUpdate(): void {
|
||||
$room = $this->createMock(Room::class);
|
||||
$comment = $this->createMock(IComment::class);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue