Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117758625
RoomsTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
RoomsTest.php
View Options
<?php
namespace
Tests\Browser\Meet
;
use
App\Sku
;
use
Tests\Browser
;
use
Tests\Browser\Components\Toast
;
use
Tests\Browser\Pages\Dashboard
;
use
Tests\Browser\Pages\Home
;
use
Tests\Browser\Pages\Meet\Room
as
RoomPage
;
use
Tests\Browser\Pages\UserInfo
;
use
Tests\TestCaseDusk
;
class
RoomsTest
extends
TestCaseDusk
{
/**
* {@inheritDoc}
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
clearMeetEntitlements
();
}
/**
* {@inheritDoc}
*/
public
function
tearDown
():
void
{
$this
->
clearMeetEntitlements
();
parent
::
tearDown
();
}
/**
* Test rooms page (unauthenticated and unauthorized)
*
* @group openvidu
*/
public
function
testRoomsUnauth
():
void
{
// Test that the page requires authentication
$this
->
browse
(
function
(
Browser
$browser
)
{
$browser
->
visit
(
'/rooms'
)
->
on
(
new
Home
())
// User has no 'meet' entitlement yet, expect redirect to error page
->
submitLogon
(
'john@kolab.org'
,
'simple123'
,
false
)
->
waitFor
(
'#app > #error-page'
)
->
assertSeeIn
(
'#error-page .code'
,
'403'
)
->
assertSeeIn
(
'#error-page .message'
,
'Access denied'
);
});
}
/**
* Test rooms page
*
* @group openvidu
*/
public
function
testRooms
():
void
{
$this
->
browse
(
function
(
Browser
$browser
)
{
$href
=
\config
(
'app.url'
)
.
'/meet/john'
;
$john
=
$this
->
getTestUser
(
'john@kolab.org'
);
// User has no 'meet' entitlement yet
$browser
->
visit
(
'/login'
)
->
on
(
new
Home
())
->
submitLogon
(
'john@kolab.org'
,
'simple123'
,
true
)
->
on
(
new
Dashboard
())
->
assertMissing
(
'@links a.link-chat'
);
// Goto user subscriptions, and enable 'meet' subscription
$browser
->
visit
(
'/user/'
.
$john
->
id
)
->
on
(
new
UserInfo
())
->
whenAvailable
(
'@skus'
,
function
(
$browser
)
{
$browser
->
click
(
'#sku-input-meet'
);
})
->
click
(
'button[type=submit]'
)
->
assertToast
(
Toast
::
TYPE_SUCCESS
,
'User data updated successfully.'
)
->
click
(
'.navbar-brand'
)
->
on
(
new
Dashboard
())
->
assertSeeIn
(
'@links a.link-chat'
,
'Video chat'
)
// Make sure the element also exists on Dashboard page load
->
refresh
()
->
on
(
new
Dashboard
())
->
assertSeeIn
(
'@links a.link-chat'
,
'Video chat'
);
// Test Video chat page
$browser
->
click
(
'@links a.link-chat'
)
->
waitFor
(
'#meet-rooms'
)
->
waitFor
(
'.card-text a'
)
->
assertSeeIn
(
'.card-title'
,
'Voice & Video Conferencing'
)
->
assertSeeIn
(
'.card-text a'
,
$href
)
->
assertAttribute
(
'.card-text a'
,
'href'
,
$href
)
->
click
(
'.card-text a'
)
->
on
(
new
RoomPage
(
'john'
))
// check that entering the room skips the logon form
->
assertMissing
(
'@toolbar'
)
->
assertMissing
(
'@menu'
)
->
assertMissing
(
'@session'
)
->
assertMissing
(
'@chat'
)
->
assertMissing
(
'@login-form'
)
->
assertVisible
(
'@setup-form'
)
->
assertSeeIn
(
'@setup-status-message'
,
"The room is closed. It will be open for others after you join."
)
->
assertSeeIn
(
'@setup-button'
,
"JOIN"
)
->
click
(
'@setup-button'
)
->
waitFor
(
'@session'
)
->
assertMissing
(
'@setup-form'
);
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Apr 4 2026, 9:52 AM (4 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
83/de/ff81c562923db8790448d31e368f
Default Alt Text
RoomsTest.php (3 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline