mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Bump laravel/dusk (#12808)
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
"fakerphp/faker": "^1.9.1",
|
"fakerphp/faker": "^1.9.1",
|
||||||
"friendsofphp/php-cs-fixer": "^2.16",
|
"friendsofphp/php-cs-fixer": "^2.16",
|
||||||
"justinrainbow/json-schema": "^5.2",
|
"justinrainbow/json-schema": "^5.2",
|
||||||
"laravel/dusk": "^6.7",
|
"laravel/dusk": "^6.15",
|
||||||
"mockery/mockery": "^1.4.2",
|
"mockery/mockery": "^1.4.2",
|
||||||
"nunomaduro/collision": "^5.0",
|
"nunomaduro/collision": "^5.0",
|
||||||
"nunomaduro/larastan": "^0.7.4",
|
"nunomaduro/larastan": "^0.7.4",
|
||||||
|
14
composer.lock
generated
14
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "316831da542ec9f0107546c0d62b49b1",
|
"content-hash": "85d20b0e5d6205452dac25d0d5db067b",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "amenadiel/jpgraph",
|
"name": "amenadiel/jpgraph",
|
||||||
@@ -8227,16 +8227,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/dusk",
|
"name": "laravel/dusk",
|
||||||
"version": "v6.14.0",
|
"version": "v6.15.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/dusk.git",
|
"url": "https://github.com/laravel/dusk.git",
|
||||||
"reference": "c0560c3b2ebcb491bf2b45d275817e80f1851f0b"
|
"reference": "45b55fa20321086c4f8cc4e712cbe54db644e21c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/dusk/zipball/c0560c3b2ebcb491bf2b45d275817e80f1851f0b",
|
"url": "https://api.github.com/repos/laravel/dusk/zipball/45b55fa20321086c4f8cc4e712cbe54db644e21c",
|
||||||
"reference": "c0560c3b2ebcb491bf2b45d275817e80f1851f0b",
|
"reference": "45b55fa20321086c4f8cc4e712cbe54db644e21c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -8294,9 +8294,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/laravel/dusk/issues",
|
"issues": "https://github.com/laravel/dusk/issues",
|
||||||
"source": "https://github.com/laravel/dusk/tree/v6.14.0"
|
"source": "https://github.com/laravel/dusk/tree/v6.15.0"
|
||||||
},
|
},
|
||||||
"time": "2021-03-23T17:05:41+00:00"
|
"time": "2021-04-06T14:14:57+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "maximebf/debugbar",
|
"name": "maximebf/debugbar",
|
||||||
|
@@ -19,7 +19,9 @@ abstract class DuskTestCase extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
public static function prepare()
|
public static function prepare()
|
||||||
{
|
{
|
||||||
static::startChromeDriver();
|
if (! static::runningInSail()) {
|
||||||
|
static::startChromeDriver();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,17 +31,31 @@ abstract class DuskTestCase extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
protected function driver()
|
protected function driver()
|
||||||
{
|
{
|
||||||
$arguments = [
|
$options = (new ChromeOptions)->addArguments(collect([
|
||||||
'--disable-gpu',
|
'--window-size=1920,1080',
|
||||||
];
|
])->unless($this->hasHeadlessDisabled(), function ($items) {
|
||||||
|
return $items->merge([
|
||||||
|
'--disable-gpu',
|
||||||
|
'--headless',
|
||||||
|
]);
|
||||||
|
})->all());
|
||||||
|
|
||||||
if (getenv('CHROME_HEADLESS')) {
|
return RemoteWebDriver::create(
|
||||||
$arguments[] = '--headless';
|
$_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515',
|
||||||
}
|
DesiredCapabilities::chrome()->setCapability(
|
||||||
|
ChromeOptions::CAPABILITY, $options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return RemoteWebDriver::create('http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
/**
|
||||||
ChromeOptions::CAPABILITY,
|
* Determine whether the Dusk command has disabled headless mode.
|
||||||
(new ChromeOptions)->addArguments($arguments)
|
*
|
||||||
));
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function hasHeadlessDisabled()
|
||||||
|
{
|
||||||
|
return isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
|
||||||
|
isset($_ENV['DUSK_HEADLESS_DISABLED']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user