瀏覽代碼

github action

jqh 4 年之前
父節點
當前提交
3f662d420c
共有 2 個文件被更改,包括 15 次插入15 次删除
  1. 1 1
      .github/workflows/laravel5.yml
  2. 14 14
      tests/DuskTestCase.php

+ 1 - 1
.github/workflows/laravel5.yml

@@ -87,7 +87,7 @@ jobs:
           export DISPLAY=:99.0
           sudo Xvfb :99.0 &
           sudo chmod -R 0755 ./vendor/laravel/dusk/bin/
-          ./vendor/laravel/dusk/bin/chromedriver-linux --headless --disable-gpu --remote-debugging-port=9515 http://localhost > /dev/null 2>&1 &
+          ./vendor/laravel/dusk/bin/chromedriver-linux  > /dev/null 2>&1 &
           php artisan serve --port=8300 > /dev/null 2>&1 &
 
       - name: Run test suite

+ 14 - 14
tests/DuskTestCase.php

@@ -77,20 +77,20 @@ abstract class DuskTestCase extends BaseTestCase
      *
      * @return \Facebook\WebDriver\Remote\RemoteWebDriver
      */
-    protected function driver()
-    {
-        $options = (new ChromeOptions)->addArguments([
-            '--disable-gpu',
-            '--headless',
-            '--window-size=1920,1080',
-        ]);
-
-        return RemoteWebDriver::create(
-            'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
-                ChromeOptions::CAPABILITY_W3C, $options
-            )
-        );
-    }
+    //protected function driver()
+    //{
+    //    $options = (new ChromeOptions)->addArguments([
+    //        '--disable-gpu',
+    //        '--headless',
+    //        '--window-size=1920,1080',
+    //    ]);
+    //
+    //    return RemoteWebDriver::create(
+    //        'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
+    //            ChromeOptions::CAPABILITY_W3C, $options
+    //        )
+    //    );
+    //}
 
     /**
      * Build the process to run the Chromedriver.