Procházet zdrojové kódy

Skip firefox binary startup tests when we have no display

This should fix TravisCI.
Daniel Gempesaw před 10 roky
rodič
revize
5b3db32f0f
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      t/CanStartBinary.t

+ 4 - 2
t/CanStartBinary.t

@@ -3,10 +3,10 @@
 use strict;
 use warnings;
 use File::Which qw/which/;
-use Selenium::Firefox::Binary;
 use Selenium::Chrome;
-use Selenium::PhantomJS;
 use Selenium::Firefox;
+use Selenium::Firefox::Binary;
+use Selenium::PhantomJS;
 use Test::More;
 
 unless ( $ENV{RELEASE_TESTING} ) {
@@ -49,6 +49,8 @@ FIREFOX: {
     ok($command =~ /firefox -no-remote/, 'firefox command has proper args');
 
   SKIP: {
+        skip 'Firefox will not start up without a display', 3
+          unless $ENV{DISPLAY};
         my $binary = Selenium::Firefox::Binary::firefox_path();
         skip 'Firefox binary not found in path', 3
           unless $binary;