* #17 - set up Laravel Dusk * #17 - ecs fix * #17 - fix * #17 - fix * #17 - fix * #17 - fix * Update .env.dusk.local Co-authored-by: Krzysztof Rewak <krzysztof.rewak@blumilk.pl> Co-authored-by: Adrian Hopek <adrian.hopek@blumilk.pl> Co-authored-by: Krzysztof Rewak <krzysztof.rewak@blumilk.pl>
This commit is contained in:
20
tests/Browser/Pages/HomePage.php
Normal file
20
tests/Browser/Pages/HomePage.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Browser\Pages;
|
||||
|
||||
use Laravel\Dusk\Browser;
|
||||
|
||||
class HomePage extends Page
|
||||
{
|
||||
public function url()
|
||||
{
|
||||
return "/";
|
||||
}
|
||||
|
||||
public function assert(Browser $browser): void
|
||||
{
|
||||
$browser->assertPathIs($this->url());
|
||||
}
|
||||
}
|
17
tests/Browser/Pages/Page.php
Normal file
17
tests/Browser/Pages/Page.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Browser\Pages;
|
||||
|
||||
use Laravel\Dusk\Page as BasePage;
|
||||
|
||||
abstract class Page extends BasePage
|
||||
{
|
||||
public static function siteElements()
|
||||
{
|
||||
return [
|
||||
"@element" => "#selector",
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user