Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120838723
Dialog.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
Dialog.php
View Options
<?php
namespace
Tests\Browser\Components
;
use
Laravel\Dusk\Component
as
BaseComponent
;
use
PHPUnit\Framework\Assert
as
PHPUnit
;
class
Dialog
extends
BaseComponent
{
protected
$selector
;
public
function
__construct
(
$selector
)
{
$this
->
selector
=
trim
(
$selector
);
}
/**
* Get the root selector for the component.
*
* @return string
*/
public
function
selector
()
{
return
$this
->
selector
;
}
/**
* Assert that the browser page contains the component.
*
* @param \Laravel\Dusk\Browser $browser
*
* @return void
*/
public
function
assert
(
$browser
)
{
$browser
->
waitFor
(
$this
->
selector
()
.
'.modal.show'
);
}
/**
* Get the element shortcuts for the component.
*
* @return array
*/
public
function
elements
()
{
return
[
'@title'
=>
'.modal-title'
,
'@body'
=>
'.modal-body'
,
'@button-action'
=>
'.modal-footer button.modal-action'
,
'@button-cancel'
=>
'.modal-footer button.modal-cancel'
,
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 2:03 PM (1 w, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18858346
Default Alt Text
Dialog.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline