Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
[WIP]: port tests to latest capybara and chromedriver
Browse files Browse the repository at this point in the history
  • Loading branch information
mcritchlow committed Jul 31, 2018
1 parent ee36eed commit c7e93e2
Show file tree
Hide file tree
Showing 8 changed files with 213 additions and 213 deletions.
42 changes: 27 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
FROM ruby:2.3.7
FROM ruby:2.3.7-alpine

# Maintainer
MAINTAINER "Matt Critchlow <mcritchlow@ucsd.edu">

RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends nodejs libicu-dev libfontconfig1-dev libjpeg-dev libfreetype6 \
&& apt-get clean
RUN apk add --no-cache \
build-base \
busybox \
ca-certificates \
chromium \
chromium-chromedriver \
curl \
git \
gnupg1 \
gpgme \
less \
libffi-dev \
libxml2-dev \
libxslt-dev \
linux-headers \
libsodium-dev \
nodejs \
openssh-client \
postgresql-dev \
tzdata \
rsync

ENV PHANTOM_JS_TAG 2.1.1
# Headless chromium for tests
ENV CHROME_BIN=/usr/bin/chromium-browser
ENV CHROME_PATH=/usr/lib/chromium/
ENV CHROME_NO_SANDBOX=true

# Downloading bin, unzipping & removing zip
WORKDIR /tmp
RUN wget -q http://cnpmjs.org/mirrors/phantomjs/phantomjs-${PHANTOM_JS_TAG}-linux-x86_64.tar.bz2 -O phantomjs.tar.bz2 \
&& tar xjf phantomjs.tar.bz2 \
&& rm -rf phantomjs.tar.bz2 \
&& mv phantomjs-* phantomjs \
&& mv /tmp/phantomjs/bin/phantomjs /usr/local/bin/phantomjs

RUN echo "phantomjs binary is located at `which phantomjs`" \
&& echo "just run 'phantomjs' (version `phantomjs -v`)"
ENV RAILS_ENV=test

# Trick to copy in Gemfile before other files.
# This way bundle install step only runs again if THOSE files change
Expand Down
22 changes: 10 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ gem 'blacklight', '~> 4.7.0' # locked
gem 'hydra-head', '~> 6.5.2' # locked
gem 'active-fedora', '~> 6.7.8' # locked
gem 'solrizer', '~> 3.1.0' # locked
gem 'rest-client', '~> 1.8.0' # locked
gem 'blacklight_advanced_search', '~> 2.2.0' # locked
gem 'kaminari', '~> 0.15.1' # locked (0.16.0+ breaks pagination)
gem 'share_notify', github: 'samvera-labs/share_notify', branch: 'master'
gem 'share_notify', git: 'https://github.com/samvera-labs/share_notify', branch: 'master'

# private fork of solrizer-fedora with auto-commit disabled
#gem 'solrizer-fedora', '3.0.0.pre1' # PRE-LOCK
gem "solrizer-fedora", github: 'ucsdlib/solrizer-fedora', ref: '87c2d35e'
gem "solrizer-fedora", git: 'https://github.com/ucsdlib/solrizer-fedora', ref: '87c2d35e'

gem 'sitemap_generator', '~> 5.3.1'

Expand All @@ -35,17 +36,16 @@ gem 'capistrano-rails', '~> 1.2.3'
gem 'capistrano-rbenv', '~> 2.1.1'
gem 'capistrano-bundler', '~> 1.2.0'

gem "unicode", '0.4.4.3', :platforms => [:mri_18, :mri_19]
gem "i18n", '~> 0.8.1'
gem "bootstrap-sass", '~> 2.3.2.2' # locked because blacklight 4.7
gem "bower-rails", "~> 0.11.0"
gem "responders", "~> 2.4.0"
gem 'nokogiri', '1.8.2'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', '~> 0.12.3', :platforms => :ruby
# gem 'therubyracer', '~> 0.12.3', :platforms => :ruby
gem 'uglifier', '~> 3.2.0'
gem 'rspec-mocks', '3.6.0'
# gem 'rspec-mocks'
gem 'newrelic_rpm', '4.1.0.333'

gem 'lograge', '0.5.1'
Expand All @@ -57,21 +57,19 @@ group :development, :test do
gem 'sass-rails', '~> 5.0.5' # locked
gem 'coffee-rails', '~> 4.2.1'
gem 'pry', '~> 0.10.4'
gem 'capybara', '~> 2.14.0'
gem 'selenium-webdriver', '3.4.0'
gem 'capybara', '~> 3.4.0'
gem 'selenium-webdriver', '3.8.0'
gem 'launchy', '~> 2.4.3'
gem "minitest", '~> 5.10.2'
gem 'rspec-rails', '3.6.0'
gem 'rspec-activemodel-mocks', '~> 1.0'
gem 'rspec-rails', '3.7.2'
gem 'rspec-activemodel-mocks'#, '~> 1.0'
gem 'simplecov', '~> 0.14.1'
gem 'rubocop', '0.49.1', require: false
gem 'rubocop-rspec', '1.15.1'
gem 'unicorn', '~> 5.3.0'
gem 'rspec_junit_formatter', '~> 0.2.3'
gem 'poltergeist', '1.15.0'
gem 'rspec_junit_formatter'#, '~> 0.2.3'
end

group :staging do
gem 'activerecord-postgresql-adapter'
gem 'rake', '~> 12.0.0'
end
Loading

0 comments on commit c7e93e2

Please sign in to comment.