mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Bump laravel/dusk (#12808)
This commit is contained in:
parent
76803c2acc
commit
89d9696fe5
@ -67,7 +67,7 @@
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"friendsofphp/php-cs-fixer": "^2.16",
|
||||
"justinrainbow/json-schema": "^5.2",
|
||||
"laravel/dusk": "^6.7",
|
||||
"laravel/dusk": "^6.15",
|
||||
"mockery/mockery": "^1.4.2",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"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",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "316831da542ec9f0107546c0d62b49b1",
|
||||
"content-hash": "85d20b0e5d6205452dac25d0d5db067b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amenadiel/jpgraph",
|
||||
@ -8227,16 +8227,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/dusk",
|
||||
"version": "v6.14.0",
|
||||
"version": "v6.15.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/dusk.git",
|
||||
"reference": "c0560c3b2ebcb491bf2b45d275817e80f1851f0b"
|
||||
"reference": "45b55fa20321086c4f8cc4e712cbe54db644e21c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/dusk/zipball/c0560c3b2ebcb491bf2b45d275817e80f1851f0b",
|
||||
"reference": "c0560c3b2ebcb491bf2b45d275817e80f1851f0b",
|
||||
"url": "https://api.github.com/repos/laravel/dusk/zipball/45b55fa20321086c4f8cc4e712cbe54db644e21c",
|
||||
"reference": "45b55fa20321086c4f8cc4e712cbe54db644e21c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -8294,9 +8294,9 @@
|
||||
],
|
||||
"support": {
|
||||
"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",
|
||||
|
@ -19,7 +19,9 @@ abstract class DuskTestCase extends BaseTestCase
|
||||
*/
|
||||
public static function prepare()
|
||||
{
|
||||
static::startChromeDriver();
|
||||
if (! static::runningInSail()) {
|
||||
static::startChromeDriver();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -29,17 +31,31 @@ abstract class DuskTestCase extends BaseTestCase
|
||||
*/
|
||||
protected function driver()
|
||||
{
|
||||
$arguments = [
|
||||
'--disable-gpu',
|
||||
];
|
||||
$options = (new ChromeOptions)->addArguments(collect([
|
||||
'--window-size=1920,1080',
|
||||
])->unless($this->hasHeadlessDisabled(), function ($items) {
|
||||
return $items->merge([
|
||||
'--disable-gpu',
|
||||
'--headless',
|
||||
]);
|
||||
})->all());
|
||||
|
||||
if (getenv('CHROME_HEADLESS')) {
|
||||
$arguments[] = '--headless';
|
||||
}
|
||||
return RemoteWebDriver::create(
|
||||
$_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515',
|
||||
DesiredCapabilities::chrome()->setCapability(
|
||||
ChromeOptions::CAPABILITY, $options
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return RemoteWebDriver::create('http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
||||
ChromeOptions::CAPABILITY,
|
||||
(new ChromeOptions)->addArguments($arguments)
|
||||
));
|
||||
/**
|
||||
* Determine whether the Dusk command has disabled headless mode.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasHeadlessDisabled()
|
||||
{
|
||||
return isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
|
||||
isset($_ENV['DUSK_HEADLESS_DISABLED']);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user