mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
ec57d3b669
* Remove unused routes Prevents route:cache from working also * Run artisan optimize after composer install Helps cleaning up issues with upgrades, and also makes laravel a bit faster * Update composer.json Co-authored-by: Tony Murray <murraytony@gmail.com>
46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace LibreNMS\Tests;
|
|
|
|
use Facebook\WebDriver\Chrome\ChromeOptions;
|
|
use Facebook\WebDriver\Remote\DesiredCapabilities;
|
|
use Facebook\WebDriver\Remote\RemoteWebDriver;
|
|
use Laravel\Dusk\TestCase as BaseTestCase;
|
|
|
|
abstract class DuskTestCase extends BaseTestCase
|
|
{
|
|
use CreatesApplication;
|
|
|
|
/**
|
|
* Prepare for Dusk test execution.
|
|
*
|
|
* @beforeClass
|
|
* @return void
|
|
*/
|
|
public static function prepare()
|
|
{
|
|
static::startChromeDriver();
|
|
}
|
|
|
|
/**
|
|
* Create the RemoteWebDriver instance.
|
|
*
|
|
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
|
|
*/
|
|
protected function driver()
|
|
{
|
|
$arguments = [
|
|
'--disable-gpu',
|
|
];
|
|
|
|
if (getenv('CHROME_HEADLESS')) {
|
|
$arguments[] = '--headless';
|
|
}
|
|
|
|
return RemoteWebDriver::create('http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
|
ChromeOptions::CAPABILITY,
|
|
(new ChromeOptions)->addArguments($arguments)
|
|
));
|
|
}
|
|
}
|