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