diff --git a/.github/workflows/browser-tests.yml b/.github/workflows/browser-tests.yml index 1e35e0e2d..bcf6354b4 100644 --- a/.github/workflows/browser-tests.yml +++ b/.github/workflows/browser-tests.yml @@ -51,7 +51,7 @@ jobs: run: php vendor/bin/testbench dusk:chrome-driver --detect - name: Start Chrome Driver - run: ./bin/chromedriver-linux & + run: ./bin/chromedriver-linux --port=9515 & - name: Run Laravel Server run: php vendor/bin/testbench serve --no-reload & diff --git a/src/TestCase.php b/src/TestCase.php index ade796381..7fa8eb8fd 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -43,7 +43,8 @@ protected function setUp(): void protected function driver() { return RemoteWebDriver::create( - 'http://localhost:9515', DesiredCapabilities::chrome() + $_ENV['DUSK_DRIVER_URL'] ?? env('DUSK_DRIVER_URL') ?? 'http://localhost:9515', + DesiredCapabilities::chrome() ); } diff --git a/stubs/DuskTestCase.stub b/stubs/DuskTestCase.stub index b0211948f..d34b71552 100644 --- a/stubs/DuskTestCase.stub +++ b/stubs/DuskTestCase.stub @@ -20,7 +20,7 @@ abstract class DuskTestCase extends BaseTestCase public static function prepare(): void { if (! static::runningInSail()) { - static::startChromeDriver(); + static::startChromeDriver(['--port=9515']); } }