Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/devdojo/auth/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
'center_align_text' => false,
'social_providers_location' => 'bottom',
'check_account_exists_before_login' => false,
'include_wire_navigate' => true,
];
2 changes: 1 addition & 1 deletion resources/views/components/elements/link.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a
{{ $attributes->except('wire:navigate') }}
wire:navigate
@if(config('devdojo.auth.settings.include_wire_navigate', true)) wire:navigate @endif
>
{{ $slot }}
</a>
10 changes: 10 additions & 0 deletions tests/Browser/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

use Laravel\Dusk\Browser;

test('basic example', function () {
$this->browse(function (Browser $browser) {
$browser->visit('/')
->assertSee('Laravel');
});
});
36 changes: 36 additions & 0 deletions tests/Browser/Pages/HomePage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace Tests\Browser\Pages;

use Laravel\Dusk\Browser;

class HomePage extends Page
{
/**
* Get the URL for the page.
*/
public function url(): string
{
return '/';
}

/**
* Assert that the browser is on the page.
*/
public function assert(Browser $browser): void
{
//
}

/**
* Get the element shortcuts for the page.
*
* @return array<string, string>
*/
public function elements(): array
{
return [
'@element' => '#selector',
];
}
}
20 changes: 20 additions & 0 deletions tests/Browser/Pages/Page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Tests\Browser\Pages;

use Laravel\Dusk\Page as BasePage;

abstract class Page extends BasePage
{
/**
* Get the global element shortcuts for the site.
*
* @return array<string, string>
*/
public static function siteElements(): array
{
return [
'@element' => '#selector',
];
}
}