Laravel dusk implementation for testing

This commit is contained in:
Fairuz
2022-04-23 16:14:55 +08:00
parent 2e8e545ed9
commit d81c8b17bd
11 changed files with 187 additions and 5 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Tests\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
class ExampleTest extends DuskTestCase
{
/**
* A basic browser test example.
*
* @return void
*/
public function testBasicExample()
{
$this->browse(function (Browser $browser) {
$browser->visit('http://localhost:86')
->pause(500)
->type('email', 'junkit.mah@bioloop.com.my')
->type('password', '123456abcabc')
->click('#sign-in')
->pause(5000)
->assertPathIs('/dashboard');
});
}
}