From 4d9156ebf72f258c2983e1e020e59d9912129de2 Mon Sep 17 00:00:00 2001 From: Jure Grabnar Date: Mon, 30 Sep 2019 16:08:44 +0200 Subject: [PATCH] Add chromium-driver patch from Alex --- Dockerfile | 7 ++++++- features/support/env.rb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bdbe7583d..417d4f432 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,11 @@ FROM ruby:2.6.4-buster MAINTAINER BioSistemika +RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list && \ + wget -O /usr/bin/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/77.0.3865.40/chromedriver_linux64.zip && \ + unzip /usr/bin/chromedriver_linux64.zip -d /usr/bin/ + # additional dependecies # libSSL-1.0 is required by wkhtmltopdf binary # libreoffice for file preview generation @@ -18,7 +23,7 @@ RUN apt-get update -qq && \ sudo graphviz --no-install-recommends \ libreoffice \ libfile-mimeinfo-perl \ - chromium-driver && \ + google-chrome-stable=77.* && \ npm install -g yarn && \ ln -s /usr/lib/x86_64-linux-gnu/libvips.so.42 /usr/lib/x86_64-linux-gnu/libvips.so && \ rm -rf /var/lib/apt/lists/* diff --git a/features/support/env.rb b/features/support/env.rb index f402453ac..63ccb9c9e 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -58,7 +58,7 @@ ActionController::Base.allow_rescue = false begin require 'database_cleaner' require 'database_cleaner/cucumber' - DatabaseCleaner.strategy = :transaction + DatabaseCleaner.strategy = :truncation rescue NameError raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." end