Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Meet/RoomControlsTest.php
Show All 9 Lines | |||||
class RoomControlsTest extends TestCaseDusk | class RoomControlsTest extends TestCaseDusk | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
*/ | */ | ||||
public function setUp(): void | public function setUp(): void | ||||
{ | { | ||||
parent::setUp(); | parent::setUp(); | ||||
$this->clearBetaEntitlements(); | $this->clearMeetEntitlements(); | ||||
} | } | ||||
public function tearDown(): void | public function tearDown(): void | ||||
{ | { | ||||
$this->clearBetaEntitlements(); | $this->clearMeetEntitlements(); | ||||
parent::tearDown(); | parent::tearDown(); | ||||
} | } | ||||
/** | /** | ||||
* Test fullscreen buttons | * Test fullscreen buttons | ||||
* | * | ||||
* @group openvidu | * @group openvidu | ||||
*/ | */ | ||||
public function testFullscreen(): void | public function testFullscreen(): void | ||||
{ | { | ||||
// TODO: This test does not work in headless mode | // TODO: This test does not work in headless mode | ||||
$this->markTestIncomplete(); | $this->markTestIncomplete(); | ||||
/* | /* | ||||
// 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->assignBetaEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
// Join the room as an owner (authenticate) | // Join the room as an owner (authenticate) | ||||
$browser->visit(new RoomPage('john')) | $browser->visit(new RoomPage('john')) | ||||
->click('@setup-button') | ->click('@setup-button') | ||||
->assertMissing('@toolbar') | ->assertMissing('@toolbar') | ||||
->assertMissing('@menu') | ->assertMissing('@menu') | ||||
->assertMissing('@session') | ->assertMissing('@session') | ||||
Show All 38 Lines | */ | ||||
{ | { | ||||
// 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->assignBetaEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $owner, Browser $guest) { | $this->browse(function (Browser $owner, Browser $guest) { | ||||
// Join the room as an owner (authenticate) | // Join the room as an owner (authenticate) | ||||
$owner->visit(new RoomPage('john')) | $owner->visit(new RoomPage('john')) | ||||
->click('@setup-button') | ->click('@setup-button') | ||||
->submitLogon('john@kolab.org', 'simple123') | ->submitLogon('john@kolab.org', 'simple123') | ||||
->waitFor('@setup-form') | ->waitFor('@setup-form') | ||||
->waitUntilMissing('@setup-status-message.loading') | ->waitUntilMissing('@setup-status-message.loading') | ||||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | */ | ||||
{ | { | ||||
// 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->assignBetaEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $owner, Browser $guest) { | $this->browse(function (Browser $owner, Browser $guest) { | ||||
// Join the room as an owner | // Join the room as an owner | ||||
$owner->visit(new RoomPage('john')) | $owner->visit(new RoomPage('john')) | ||||
->waitFor('@setup-form') | ->waitFor('@setup-form') | ||||
->waitUntilMissing('@setup-status-message.loading') | ->waitUntilMissing('@setup-status-message.loading') | ||||
->type('@setup-nickname-input', 'john') | ->type('@setup-nickname-input', 'john') | ||||
->clickWhenEnabled('@setup-button') | ->clickWhenEnabled('@setup-button') | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | */ | ||||
{ | { | ||||
// 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->assignBetaEntitlement('john@kolab.org', 'meet'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
$this->browse(function (Browser $owner, Browser $guest) { | $this->browse(function (Browser $owner, Browser $guest) { | ||||
// Join the room as an owner | // Join the room as an owner | ||||
$owner->visit(new RoomPage('john')) | $owner->visit(new RoomPage('john')) | ||||
->waitFor('@setup-form') | ->waitFor('@setup-form') | ||||
->waitUntilMissing('@setup-status-message.loading') | ->waitUntilMissing('@setup-status-message.loading') | ||||
->type('@setup-nickname-input', 'john') | ->type('@setup-nickname-input', 'john') | ||||
->clickWhenEnabled('@setup-button') | ->clickWhenEnabled('@setup-button') | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |