Ver código fonte

github action

jqh 4 anos atrás
pai
commit
09149c9cae
2 arquivos alterados com 24 adições e 17 exclusões
  1. 10 3
      .github/workflows/laravel5.yml
  2. 14 14
      tests/DuskTestCase.php

+ 10 - 3
.github/workflows/laravel5.yml

@@ -15,10 +15,17 @@ jobs:
         with:
           php-version: '7.1'
 
-      - uses: nanasess/setup-chromedriver@master
+#      - uses: nanasess/setup-chromedriver@master
+#        with:
+#          # Optional: do not specify to match Chrome's version
+#          chromedriver-version: '89.0.4389.23'
+      - name: Setup Chrome
+        # You may pin to the exact commit or the version.
+        # uses: browser-actions/setup-chrome@4fa655aad48f56911cad16db9252399a9e592848
+        uses: browser-actions/setup-chrome@v0.0.0
         with:
-          # Optional: do not specify to match Chrome's version
-          chromedriver-version: '89.0.4389.23'
+          # The Chromium version to install and use.
+          chromium-version: '89.0.4389.23'
 
       - run: |
           export DISPLAY=:99

+ 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.