diff --git a/tests/UpdateTest.php b/tests/UpdateTest.php index ff3b680..5908728 100644 --- a/tests/UpdateTest.php +++ b/tests/UpdateTest.php @@ -67,6 +67,10 @@ public function testChromeVersionDetection() $version = $this->driverVersion(explode('.', $chromeVersion)[0]); + $previousVersion = explode('.', $version)[0] - 1; + + $this->artisan('dusk:update', ['version' => $previousVersion]); + $this->artisan('dusk:update', ['--detect' => null]) ->expectsOutput('Chrome version '.$chromeVersion.' detected.') ->expectsOutput('ChromeDriver binary successfully updated to version '.$version.'.') @@ -79,8 +83,6 @@ public function testChromeVersionDetection() $this->assertStringContainsString($version, shell_exec(__DIR__.'/bin/chromedriver-linux --version')); $this->assertTrue(is_executable(__DIR__.'/bin/chromedriver-linux')); - $this->assertFalse(file_exists(__DIR__.'/bin/chromedriver-mac')); - $this->assertFalse(file_exists(__DIR__.'/bin/chromedriver-win.exe')); } public function testChromeVersionDetectionWithPath() @@ -89,6 +91,10 @@ public function testChromeVersionDetectionWithPath() $version = $this->driverVersion(explode('.', $chromeVersion)[0]); + $previousVersion = explode('.', $version)[0] - 1; + + $this->artisan('dusk:update', ['version' => $previousVersion]); + $this->artisan('dusk:update', ['--detect' => '/usr/bin/google-chrome']) ->expectsOutput('Chrome version '.$chromeVersion.' detected.') ->expectsOutput('ChromeDriver binary successfully updated to version '.$version.'.') @@ -96,8 +102,6 @@ public function testChromeVersionDetectionWithPath() $this->assertStringContainsString($version, shell_exec(__DIR__.'/bin/chromedriver-linux --version')); $this->assertTrue(is_executable(__DIR__.'/bin/chromedriver-linux')); - $this->assertFalse(file_exists(__DIR__.'/bin/chromedriver-mac')); - $this->assertFalse(file_exists(__DIR__.'/bin/chromedriver-win.exe')); } public function testChromeVersionDetectionWithInvalidPath()