From d8d458f1db67e065f3ef7b92b2e117eed21e16b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Salvador=20P=C3=A9rez=20Garc=C3=ADa?= Date: Tue, 12 Jun 2018 12:58:41 +0200 Subject: [PATCH] Fixed test environment inside docker --- Dockerfile | 6 ++++-- spec/rails_helper.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7dd4860e3..8ec356071 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,13 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key && apt-get install -y google-chrome-stable \ && apt-get clean -RUN CHROMEDRIVER_RELEASE=2.38 \ +RUN CHROMEDRIVER_RELEASE=2.36 \ && CHROMEDRIVER_URL="http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \ && apt-get install unzip \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip $CHROMEDRIVER_URL \ - && unzip /tmp/chromedriver_linux64.zip chromedriver -d /usr/local/bin \ + && unzip /tmp/chromedriver_linux64.zip chromedriver -d /usr/local/share \ + && chmod +x /usr/local/share/chromedriver \ + && ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver \ && rm /tmp/chromedriver_linux64.zip # Files created inside the container repect the ownership diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 8731eb670..1385490c8 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -32,7 +32,7 @@ end Capybara.register_driver :headless_chrome do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( - chromeOptions: { args: %w(headless window-size=1200,600) } + chromeOptions: { args: %w(headless no-sandbox window-size=1200,600) } ) Capybara::Selenium::Driver.new(