mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* php artisan serve and dusk testing * Fix style * move if into, in case we need to have different configs * fix travis yml * Add missing folders files * Try to fixup Travis-ci * revert variable, change check * skip browser tests for phpunit runs set up env correctly * maybe bg is needed * attempt to fix env * install Chrome * Update tests fix migrations * Move pylint to python2 * use testing .env * Running chrome on port 9515 conflicts with the instance started by the tests. It is probably not needed. * suppress some artisan serve output * remove the unused updater
41 lines
948 B
PHP
41 lines
948 B
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()
|
|
{
|
|
return RemoteWebDriver::create('http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
|
ChromeOptions::CAPABILITY,
|
|
(new ChromeOptions)->addArguments([
|
|
'--disable-gpu',
|
|
'--headless'
|
|
])
|
|
));
|
|
}
|
|
}
|