Fixed test environment inside docker

This commit is contained in:
Juan Salvador Pérez García
2018-06-12 12:58:41 +02:00
parent fc57bad1cd
commit d8d458f1db
2 changed files with 5 additions and 3 deletions

View File

@@ -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 install -y google-chrome-stable \
&& apt-get clean && 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" \ && CHROMEDRIVER_URL="http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
&& apt-get install unzip \ && apt-get install unzip \
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip $CHROMEDRIVER_URL \ && 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 && rm /tmp/chromedriver_linux64.zip
# Files created inside the container repect the ownership # Files created inside the container repect the ownership

View File

@@ -32,7 +32,7 @@ end
Capybara.register_driver :headless_chrome do |app| Capybara.register_driver :headless_chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( 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( Capybara::Selenium::Driver.new(