Browse Source

travis run dusk

jqh 5 years ago
parent
commit
cd062798c1
2 changed files with 7 additions and 11 deletions
  1. 2 2
      .travis.yml
  2. 5 9
      tests/ChromeProcess.php

+ 2 - 2
.travis.yml

@@ -39,8 +39,8 @@ install:
 
 before_script:
 #  - google-chrome-stable --headless --disable-gpu –-no-sandbox --remote-debugging-port=9515 http://127.0.0.1 &
-#  - chmod 777 ./dcat-admin/tests/resources/drivers/chromedriver-linux
-#  - google-chrome --headless –-no-sandbox --disable-gpu --remote-debugging-port=9515 http://127.0.0.1 &
+  - chmod 777 ./tests/resources/drivers/chromedriver-linux
+  - ./tests/resources/drivers/chromedriver-linux –-no-sandbox --disable-gpu --remote-debugging-port=9515 http://127.0.0.1 &
   - php artisan serve &
 
 script:

+ 5 - 9
tests/ChromeProcess.php

@@ -13,14 +13,10 @@ class ChromeProcess extends BaseChromeProcess
         if ($this->onWindows()) {
             $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-win.exe');
         }
-        //elseif ($this->onMac()) {
-        //    $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-mac');
-        //} else {
-        //    if (is_file('/usr/bin/google-chrome')) {
-        //        $this->driver = '/usr/bin/google-chrome';
-        //    } else {
-        //        $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-linux');
-        //    }
-        //}
+        elseif ($this->onMac()) {
+            $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-mac');
+        } else {
+            $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-linux');
+        }
     }
 }