Page MenuHomePhorge

Dialog.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

Dialog.php

<?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

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)

Event Timeline