Merge remote-tracking branch 'upstream/pull/2598'
This commit is contained in:
commit
cca1ce59f4
5 changed files with 7 additions and 21 deletions
|
@ -8,6 +8,7 @@ addons:
|
||||||
postgresql: 9.5
|
postgresql: 9.5
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
|
- firefox-geckodriver
|
||||||
- libarchive-dev
|
- libarchive-dev
|
||||||
- libgd-dev
|
- libgd-dev
|
||||||
- libffi-dev
|
- libffi-dev
|
||||||
|
|
1
Gemfile
1
Gemfile
|
@ -143,7 +143,6 @@ group :test do
|
||||||
gem "erb_lint", :require => false
|
gem "erb_lint", :require => false
|
||||||
gem "factory_bot_rails"
|
gem "factory_bot_rails"
|
||||||
gem "minitest", "~> 5.1"
|
gem "minitest", "~> 5.1"
|
||||||
gem "poltergeist"
|
|
||||||
gem "puma", "~> 3.11"
|
gem "puma", "~> 3.11"
|
||||||
gem "rails-controller-testing"
|
gem "rails-controller-testing"
|
||||||
gem "rubocop"
|
gem "rubocop"
|
||||||
|
|
|
@ -126,7 +126,6 @@ GEM
|
||||||
regexp_parser (~> 1.5)
|
regexp_parser (~> 1.5)
|
||||||
xpath (~> 3.2)
|
xpath (~> 3.2)
|
||||||
childprocess (3.0.0)
|
childprocess (3.0.0)
|
||||||
cliver (0.3.2)
|
|
||||||
coderay (1.1.2)
|
coderay (1.1.2)
|
||||||
composite_primary_keys (12.0.1)
|
composite_primary_keys (12.0.1)
|
||||||
activerecord (~> 6.0.0)
|
activerecord (~> 6.0.0)
|
||||||
|
@ -325,10 +324,6 @@ GEM
|
||||||
parser (2.7.1.1)
|
parser (2.7.1.1)
|
||||||
ast (~> 2.4.0)
|
ast (~> 2.4.0)
|
||||||
pg (1.2.3)
|
pg (1.2.3)
|
||||||
poltergeist (1.18.1)
|
|
||||||
capybara (>= 2.1, < 4)
|
|
||||||
cliver (~> 0.3.1)
|
|
||||||
websocket-driver (>= 0.2.0)
|
|
||||||
popper_js (1.16.0)
|
popper_js (1.16.0)
|
||||||
progress (3.5.2)
|
progress (3.5.2)
|
||||||
psych (3.1.0)
|
psych (3.1.0)
|
||||||
|
@ -527,7 +522,6 @@ DEPENDENCIES
|
||||||
omniauth-windowslive
|
omniauth-windowslive
|
||||||
openstreetmap-deadlock_retry (>= 1.3.0)
|
openstreetmap-deadlock_retry (>= 1.3.0)
|
||||||
pg
|
pg
|
||||||
poltergeist
|
|
||||||
psych
|
psych
|
||||||
puma (~> 3.11)
|
puma (~> 3.11)
|
||||||
quad_tile (~> 1.0.1)
|
quad_tile (~> 1.0.1)
|
||||||
|
|
|
@ -30,7 +30,7 @@ These can be installed on Ubuntu 18.04 or later with:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install ruby2.5 libruby2.5 ruby2.5-dev bundler \
|
sudo apt-get install ruby2.5 libruby2.5 ruby2.5-dev bundler \
|
||||||
libmagickwand-dev libxml2-dev libxslt1-dev nodejs \
|
libmagickwand-dev libxml2-dev libxslt1-dev nodejs \
|
||||||
apache2 apache2-dev build-essential git-core phantomjs \
|
apache2 apache2-dev build-essential git-core firefox-geckodriver \
|
||||||
postgresql postgresql-contrib libpq-dev libsasl2-dev \
|
postgresql postgresql-contrib libpq-dev libsasl2-dev \
|
||||||
imagemagick libffi-dev libgd-dev libarchive-dev libbz2-dev
|
imagemagick libffi-dev libgd-dev libarchive-dev libbz2-dev
|
||||||
sudo gem2.5 install bundler
|
sudo gem2.5 install bundler
|
||||||
|
@ -95,11 +95,11 @@ You will need to tell `bundler` that `libxml2` is installed in a Homebrew locati
|
||||||
bundle config build.libxml-ruby --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config
|
bundle config build.libxml-ruby --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to run the tests, you need `phantomjs` as well:
|
If you want to run the tests, you need `geckodriver` as well:
|
||||||
|
|
||||||
```
|
```
|
||||||
brew tap homebrew/cask
|
brew tap homebrew/cask
|
||||||
brew cask install phantomjs
|
brew cask install geckodriver
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that OS X does not have a /home directory by default, so if you are using the GPX functions, you will need to change the directories specified in config/application.yml.
|
Note that OS X does not have a /home directory by default, so if you are using the GPX functions, you will need to change the directories specified in config/application.yml.
|
||||||
|
|
|
@ -1,21 +1,13 @@
|
||||||
require "test_helper"
|
require "test_helper"
|
||||||
require "capybara/poltergeist"
|
|
||||||
|
|
||||||
# Work around weird debian/ubuntu phantomjs
|
ENV.delete("http_proxy")
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277
|
|
||||||
# https://github.com/ariya/phantomjs/issues/14376
|
|
||||||
ENV["QT_QPA_PLATFORM"] = "offscreen" if IO.popen(["phantomjs", "--version"], :err => :close).read.empty?
|
|
||||||
|
|
||||||
ActiveSupport.on_load(:action_dispatch_system_test_case) do
|
ActiveSupport.on_load(:action_dispatch_system_test_case) do
|
||||||
ActionDispatch::SystemTesting::Server.silence_puma = true
|
ActionDispatch::SystemTesting::Server.silence_puma = true
|
||||||
end
|
end
|
||||||
|
|
||||||
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
||||||
driven_by :poltergeist, :screen_size => [1400, 1400], :options => { :timeout => 120 }
|
driven_by :selenium, :using => :headless_firefox do |options|
|
||||||
|
options.add_preference("intl.accept_languages", "en")
|
||||||
# Phantomjs can pick up browser Accept-Language preferences from your desktop environment.
|
|
||||||
# We don't want this to happen during the tests!
|
|
||||||
setup do
|
|
||||||
page.driver.add_headers("Accept-Language" => "en")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue