Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Meet/RoomSetupTest.php
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | class RoomSetupTest extends TestCaseDusk | ||||
{ | { | ||||
// Make sure there's no session yet | // Make sure there's no session yet | ||||
$room = Room::where('name', 'john')->first(); | $room = Room::where('name', 'john')->first(); | ||||
if ($room->session_id) { | if ($room->session_id) { | ||||
$room->session_id = null; | $room->session_id = null; | ||||
$room->save(); | $room->save(); | ||||
} | } | ||||
$this->assignMeetEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
$browser->visit(new RoomPage('john')) | $browser->visit(new RoomPage('john')) | ||||
->within(new Menu(), function ($browser) { | ->within(new Menu(), function ($browser) { | ||||
$browser->assertMenuItems(['signup', 'explore', 'blog', 'support', 'login']); | $browser->assertMenuItems(['signup', 'explore', 'blog', 'support', 'login']); | ||||
}); | }); | ||||
if ($browser->isDesktop()) { | if ($browser->isDesktop()) { | ||||
Show All 39 Lines | class RoomSetupTest extends TestCaseDusk | ||||
/** | /** | ||||
* Test two users in a room (joining/leaving and some basic functionality) | * Test two users in a room (joining/leaving and some basic functionality) | ||||
* | * | ||||
* @group openvidu | * @group openvidu | ||||
* @depends testRoomSetup | * @depends testRoomSetup | ||||
*/ | */ | ||||
public function testTwoUsersInARoom(): void | public function testTwoUsersInARoom(): void | ||||
{ | { | ||||
$this->assignMeetEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $browser, Browser $guest) { | $this->browse(function (Browser $browser, Browser $guest) { | ||||
// In one browser window act as a guest | // In one browser window act as a guest | ||||
$guest->visit(new RoomPage('john')) | $guest->visit(new RoomPage('john')) | ||||
->assertMissing('@toolbar') | ->assertMissing('@toolbar') | ||||
->assertMissing('@menu') | ->assertMissing('@menu') | ||||
->assertMissing('@session') | ->assertMissing('@session') | ||||
->assertMissing('@chat') | ->assertMissing('@chat') | ||||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | class RoomSetupTest extends TestCaseDusk | ||||
/** | /** | ||||
* Test two subscribers-only users in a room | * Test two subscribers-only users in a room | ||||
* | * | ||||
* @group openvidu | * @group openvidu | ||||
* @depends testTwoUsersInARoom | * @depends testTwoUsersInARoom | ||||
*/ | */ | ||||
public function testSubscribers(): void | public function testSubscribers(): void | ||||
{ | { | ||||
$this->assignMeetEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $browser, Browser $guest) { | $this->browse(function (Browser $browser, Browser $guest) { | ||||
// Join the room as the owner | // Join the room as the owner | ||||
$browser->visit(new RoomPage('john')) | $browser->visit(new RoomPage('john')) | ||||
->waitFor('@setup-form') | ->waitFor('@setup-form') | ||||
->waitUntilMissing('@setup-status-message.loading') | ->waitUntilMissing('@setup-status-message.loading') | ||||
->waitFor('@setup-status-message') | ->waitFor('@setup-status-message') | ||||
->type('@setup-nickname-input', 'john') | ->type('@setup-nickname-input', 'john') | ||||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |