Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120839789
Status.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Status.php
View Options
<?php
namespace
Tests\Browser\Components
;
use
Laravel\Dusk\Browser
;
use
Laravel\Dusk\Component
as
BaseComponent
;
class
Status
extends
BaseComponent
{
/**
* Get the root selector for the component.
*
* @return string
*/
public
function
selector
()
{
return
'#status-box'
;
}
/**
* Assert that the browser page contains the component.
*
* @param Browser $browser The browser object
*/
public
function
assert
(
$browser
)
{
$browser
->
waitFor
(
$this
->
selector
());
}
/**
* Get the element shortcuts for the component.
*
* @return array
*/
public
function
elements
()
{
return
[
'@body'
=>
"#status-body"
,
'@progress-bar'
=>
".progress-bar"
,
'@progress-label'
=>
".progress-label"
,
'@refresh-button'
=>
"#status-refresh"
,
'@refresh-text'
=>
"#refresh-text"
,
];
}
/**
* Assert progress state
*/
public
function
assertProgress
(
$browser
,
int
$percent
,
string
$label
,
$class
)
{
$browser
->
assertVisible
(
'@progress-bar'
)
->
assertAttribute
(
'@progress-bar'
,
'aria-valuenow'
,
$percent
)
->
assertSeeIn
(
'@progress-label'
,
$label
)
->
withinBody
(
static
function
(
$browser
)
use
(
$class
)
{
$browser
->
assertVisible
(
'#status-box.process-'
.
$class
);
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 2:17 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18858219
Default Alt Text
Status.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline