Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System tests #303

Merged
merged 13 commits into from
Mar 17, 2020
Merged
13 changes: 9 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,21 @@ gem 'appsignal'

group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara'
gem 'database_cleaner-active_record'
gem 'factory_bot_rails'
gem 'rails-controller-testing'
gem 'rspec-collection_matchers'
gem 'rspec-rails', '~> 3.8'
gem 'timecop'
gem 'pry'
end

group :test do
gem 'capybara'
gem 'rails-controller-testing'
gem 'rspec-collection_matchers'
gem 'rspec-rails', '~> 4.0.rc'
gem 'selenium-webdriver'
gem 'webdrivers', '~> 4.0'
end

group :development do
gem 'annotate'
gem 'brakeman', require: false
Expand Down
126 changes: 68 additions & 58 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ GEM
actionpack
addressable
active_material (1.4.2)
activeadmin (2.6.1)
activeadmin (2.6.0)
arbre (~> 1.2, >= 1.2.1)
formtastic (~> 3.1)
formtastic_i18n (~> 0.4)
Expand Down Expand Up @@ -86,10 +86,10 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
annotate (3.1.0)
annotate (3.0.3)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 14.0)
appsignal (2.10.4)
appsignal (2.10.1)
rack
arbre (1.2.1)
activesupport (>= 3.0.0)
Expand All @@ -100,9 +100,9 @@ GEM
execjs (~> 2.0)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.6)
bootsnap (1.4.5)
msgpack (~> 1.0)
brakeman (4.8.0)
brakeman (4.7.2)
builder (3.2.4)
bullet (6.1.0)
activesupport (>= 3.0.0)
Expand All @@ -111,8 +111,8 @@ GEM
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
byebug (11.1.1)
cancancan (3.1.0)
capistrano (3.12.1)
cancancan (3.0.2)
capistrano (3.11.2)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
Expand All @@ -131,19 +131,20 @@ GEM
sshkit (~> 1.2)
capistrano-yarn (2.0.2)
capistrano (~> 3.0)
capybara (3.31.0)
capybara (3.30.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.2)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.5)
connection_pool (2.2.2)
countries (3.0.1)
i18n_data (~> 0.10.0)
countries (3.0.0)
i18n_data (~> 0.8.0)
sixarm_ruby_unaccent (~> 1.1)
unicode_utils (~> 1.4)
crass (1.0.6)
Expand All @@ -160,15 +161,15 @@ GEM
responders
warden (~> 1.2.3)
diff-lcs (1.3)
digest-crc (0.5.1)
discard (1.2.0)
digest-crc (0.4.1)
discard (1.1.0)
activerecord (>= 4.2, < 7)
docile (1.3.2)
dotenv (2.7.5)
dotenv-rails (2.7.5)
dotenv (= 2.7.5)
railties (>= 3.2, < 6.1)
draper (4.0.0)
draper (3.1.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
activemodel-serializers-xml (>= 1.0)
Expand All @@ -182,9 +183,9 @@ GEM
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faraday (1.0.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
ffi (1.12.2)
ffi (1.12.1)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
formtastic (3.1.5)
Expand All @@ -194,7 +195,7 @@ GEM
activerecord (>= 4.0.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
google-api-client (0.37.2)
google-api-client (0.36.4)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
Expand All @@ -205,8 +206,8 @@ GEM
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.1)
faraday (>= 0.17.3, < 2.0)
google-cloud-env (1.3.0)
faraday (~> 0.11)
google-cloud-errors (1.0.0)
google-cloud-storage (1.25.1)
addressable (~> 2.5)
Expand All @@ -215,8 +216,8 @@ GEM
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.11.0)
faraday (>= 0.17.3, < 2.0)
googleauth (0.10.0)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
Expand All @@ -228,7 +229,7 @@ GEM
httpclient (2.8.3)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
i18n_data (0.10.0)
i18n_data (0.8.0)
image_processing (1.10.3)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
Expand All @@ -242,19 +243,20 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.3.0)
jwt (2.2.1)
kaminari (1.2.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.0)
kaminari-activerecord (= 1.2.0)
kaminari-core (= 1.2.0)
kaminari-actionview (1.2.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.2.0)
kaminari-activerecord (1.2.0)
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.2.0)
kaminari-core (1.2.0)
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
language_list (1.2.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand All @@ -269,27 +271,27 @@ GEM
mimemagic (~> 0.3.2)
memoist (0.16.2)
method_source (0.9.2)
mimemagic (0.3.4)
mimemagic (0.3.3)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
msgpack (1.3.3)
msgpack (1.3.1)
multi_json (1.14.1)
multipart-post (2.1.1)
net-scp (2.0.0)
net-ssh (>= 2.6.5, < 6.0.0)
net-ssh (5.2.0)
nio4r (2.5.2)
nokogiri (1.10.9)
nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
octokit (4.15.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
orm_adapter (0.5.0)
os (1.0.1)
parallel (1.19.1)
parser (2.7.0.4)
parser (2.7.0.2)
ast (~> 2.4.0)
pg (1.2.2)
pg_search (2.3.2)
Expand All @@ -308,7 +310,7 @@ GEM
public_suffix (4.0.3)
puma (4.3.3)
nio4r (~> 2.0)
rack (2.2.2)
rack (2.1.1)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
Expand Down Expand Up @@ -359,7 +361,7 @@ GEM
execjs
railties (>= 3.2)
tilt
regexp_parser (1.7.0)
regexp_parser (1.6.0)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
Expand All @@ -371,32 +373,30 @@ GEM
actionpack (>= 5.0)
railties (>= 5.0)
retriable (3.1.2)
rexml (3.2.4)
rspec-collection_matchers (1.2.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (3.9.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-rails (4.0.0.rc1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.2)
rubocop (0.80.1)
rubocop (0.79.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-performance (1.5.2)
Expand All @@ -405,7 +405,7 @@ GEM
ruby-vips (2.0.17)
ffi (~> 1.9)
ruby_dep (1.5.0)
rubyzip (2.3.0)
rubyzip (2.0.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
Expand All @@ -426,15 +426,19 @@ GEM
faraday (> 0.8, < 2.0)
select2-rails (4.0.3)
thor (~> 0.14)
signet (0.13.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
signet (0.12.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.18.5)
simplecov (0.17.1)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sixarm_ruby_unaccent (1.2.0)
spring (2.1.0)
spring-watcher-listen (2.0.1)
Expand All @@ -447,7 +451,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.21.0)
sshkit (1.20.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (0.20.3)
Expand All @@ -472,6 +476,10 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (4.2.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
Expand All @@ -484,7 +492,7 @@ GEM
rails (>= 3.2.16)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.3.0)
zeitwerk (2.2.2)

PLATFORMS
ruby
Expand Down Expand Up @@ -533,11 +541,12 @@ DEPENDENCIES
rails-controller-testing
react-rails
rspec-collection_matchers
rspec-rails (~> 3.8)
rspec-rails (~> 4.0.rc)
rubocop
rubocop-performance
rubyzip
sass-rails (>= 6)
selenium-webdriver
simplecov
spring
spring-watcher-listen (~> 2.0.0)
Expand All @@ -546,6 +555,7 @@ DEPENDENCIES
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
webdrivers (~> 4.0)
webpacker

RUBY VERSION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ def index
)
end

# rubocop:disable Metrics/AbcSize
def show
@legislations = CCLOW::LegislationDecorator.decorate_collection(@litigation.legislations)
add_breadcrumb('Litigation cases', cclow_geography_litigation_cases_path(@geography.slug))
add_breadcrumb(@litigation.title, request.path)
@sectors = @litigation.laws_sectors.order(:name)
@keywords = @litigation.keywords.order(:name)
@responses = @litigation.responses.order(:name)
@litigation_sides = @litigation.litigation_sides.map { |ls| CCLOW::LitigationSideDecorator.decorate(ls) }
@litigation_sides = @litigation.litigation_sides
@litigation_events = @litigation.events.order(:date)
@litigation_events_with_links = @litigation_events.map do |e|
::Api::Presenters::Event.call(e, :litigation)
Expand All @@ -34,7 +33,6 @@ def show
admin_litigation_path(@litigation)
)
end
# rubocop:enable Metrics/AbcSize

private

Expand Down
Loading