So I'm running from the project root
The test I most recently wrote was CurrecyTest.php which is the one that I think is running...
<?php
namespace Tests\Browser;
use App\Currency;
use App\User;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\Log;
class CurrencyTest extends DuskTestCase
{
/**
* A Dusk test example.
*
* @return void
*/
public function testPageLoad()
{
$this->browse(function (Browser $browser) {
$adminUser = User::join('role_user', 'user_USR_PK', '=', 'USR_PK')
->join('ST_ROL_ROLES', 'ROL_PK', '=', 'role_ROL_PK')
->where('ROL_NAME', '=', 'IT & DEV')
->first();
$message = 'user selected: '. json_encode($adminUser);
Log::info(basename(__FILE__, '.php') . '->' . __FUNCTION__ . ': ' . $message);
$browser->loginAs($adminUser)
->assertAuthenticated();
$currency = Currency::inRandomOrder()
->first();
$browser->visit('/systemAdmin/currencies')
->assertSee('Currencies')
->assertSeeIn('.card-header a.create', 'Add Currency')
->waitFor('#results-table')
->assertSeeIn('#results-table', $currency->CUR_CODE);
$browser->click('.card-header a.create')
->waitForLocation('/systemAdmin/currencies/create')
->assertSee('Add Currency')
->assertSeeIn('.card-header a.back', 'Back');
});
}
}
jerry@Caesar:~/wroot/site$ php artisan dusk --verbose
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.21
Configuration: /var/www/site/phpunit.dusk.xml
. 1 / 1 (100%)
Time: 4.06 seconds, Memory: 28.00 MB
OK (1 test, 6 assertions)
jerry@Caesar:~/wroot/site$
Running the BookingSearchTests, for example...
jerry@Caesar:~/wroot/site$ php artisan dusk tests/Browser/BookingSearchTests.php --verbose
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.21
Configuration: /var/www/site/phpunit.dusk.xml
.. 2 / 2 (100%)
Time: 9.31 seconds, Memory: 30.00 MB
OK (2 tests, 11 assertions)
jerry@Caesar:~/wroot/site$
That file /var/www/site/phpunit.dusk.xml doesn't exist, btw. Should it, and what should it contain?
Thanks