| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | protected function driver() |
||
| 31 | { |
||
| 32 | $options = (new ChromeOptions)->addArguments([ |
||
|
|
|||
| 33 | '--disable-gpu', |
||
| 34 | '--headless' |
||
| 35 | ]); |
||
| 36 | |||
| 37 | // Run tests inside Docker container |
||
| 38 | switch (config('dusk.driver')) { |
||
| 39 | case 'container': |
||
| 40 | return RemoteWebDriver::create( |
||
| 41 | 'http://selenium:4444/wd/hub', DesiredCapabilities::chrome() |
||
| 42 | ); |
||
| 43 | default: // local |
||
| 44 | return RemoteWebDriver::create( |
||
| 45 | 'http://localhost:9515', DesiredCapabilities::chrome() |
||
| 46 | ); |
||
| 50 |