diff --git a/Gemfile.lock b/Gemfile.lock index 127566ac..8a9c2db7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,12 +57,14 @@ GEM sass (~> 3.2) builder (3.2.3) byebug (10.0.2) - capybara (2.2.1) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) + capybara (3.13.2) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) capybara-screenshot (1.0.21) capybara (>= 1.0, < 4) launchy @@ -132,9 +134,6 @@ GEM mail (2.7.1) mini_mime (>= 0.1.1) method_source (0.9.0) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) mini_mime (1.0.1) mini_portile2 (2.4.0) minitest (5.11.1) @@ -143,17 +142,16 @@ GEM nio4r (2.3.1) nokogiri (1.10.1) mini_portile2 (~> 2.4.0) - poltergeist (1.9.0) - capybara (~> 2.1) + poltergeist (1.18.1) + capybara (>= 2.1, < 4) cliver (~> 0.3.1) - multi_json (~> 1.0) websocket-driver (>= 0.2.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) public_suffix (3.0.2) - rack (2.0.3) - rack-test (0.8.2) + rack (2.0.6) + rack-test (1.1.0) rack (>= 1.0, < 3) rails (5.1.4) actioncable (= 5.1.4) @@ -185,6 +183,7 @@ GEM rdoc (4.2.2) json (~> 1.4) ref (2.0.0) + regexp_parser (1.3.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -258,8 +257,8 @@ GEM websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.2.0) + nokogiri (~> 1.8) yard (0.8.7.6) PLATFORMS @@ -270,7 +269,7 @@ DEPENDENCIES bootstrap-sass (= 3.1.1.1) bundler (~> 1.3) byebug - capybara (~> 2.2.0) + capybara (~> 3.13.2) capybara-screenshot (~> 1.0.11) coderay (~> 1.1.0) faker (~> 1.8.7) @@ -280,7 +279,7 @@ DEPENDENCIES jquery-rails (~> 4.3.3) jquery-ui-rails (~> 5.0.5) jquery-ui-themes (~> 0.0.11) - poltergeist (~> 1.9.0) + poltergeist (~> 1.18.0) rake (~> 10.1) rdoc (~> 4.2.0) rspec (~> 3.6.0) diff --git a/gemfiles/rails_5.0.gemfile.lock b/gemfiles/rails_5.0.gemfile.lock index 9c244c34..bffdd8d2 100644 --- a/gemfiles/rails_5.0.gemfile.lock +++ b/gemfiles/rails_5.0.gemfile.lock @@ -57,12 +57,14 @@ GEM sass (~> 3.2) builder (3.2.3) byebug (10.0.2) - capybara (2.2.1) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) + capybara (3.13.2) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) capybara-screenshot (1.0.21) capybara (>= 1.0, < 4) launchy @@ -132,9 +134,6 @@ GEM mail (2.7.0) mini_mime (>= 0.1.1) method_source (0.9.0) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) mini_mime (1.0.0) mini_portile2 (2.4.0) minitest (5.11.3) @@ -143,16 +142,15 @@ GEM nio4r (2.3.1) nokogiri (1.10.1) mini_portile2 (~> 2.4.0) - poltergeist (1.9.0) - capybara (~> 2.1) + poltergeist (1.18.1) + capybara (>= 2.1, < 4) cliver (~> 0.3.1) - multi_json (~> 1.0) websocket-driver (>= 0.2.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) public_suffix (3.0.2) - rack (2.0.5) + rack (2.0.6) rack-test (0.6.3) rack (>= 1.0) rails (5.0.7) @@ -185,6 +183,7 @@ GEM rdoc (4.2.2) json (~> 1.4) ref (2.0.0) + regexp_parser (1.3.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -258,8 +257,8 @@ GEM websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.2.0) + nokogiri (~> 1.8) yard (0.8.7.6) PLATFORMS @@ -270,7 +269,7 @@ DEPENDENCIES bootstrap-sass (= 3.1.1.1) bundler (~> 1.3) byebug - capybara (~> 2.2.0) + capybara (~> 3.13.2) capybara-screenshot (~> 1.0.11) coderay (~> 1.1.0) faker (~> 1.8.7) @@ -280,7 +279,7 @@ DEPENDENCIES jquery-rails (~> 4.3.3) jquery-ui-rails (~> 5.0.5) jquery-ui-themes (~> 0.0.11) - poltergeist (~> 1.9.0) + poltergeist (~> 1.18.0) rails (~> 5.0.0) rake (~> 10.1) rdoc (~> 4.2.0) diff --git a/gemfiles/rails_5.1.gemfile.lock b/gemfiles/rails_5.1.gemfile.lock index 946084e3..58f87636 100644 --- a/gemfiles/rails_5.1.gemfile.lock +++ b/gemfiles/rails_5.1.gemfile.lock @@ -57,12 +57,14 @@ GEM sass (~> 3.2) builder (3.2.3) byebug (10.0.2) - capybara (2.2.1) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) + capybara (3.13.2) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) capybara-screenshot (1.0.21) capybara (>= 1.0, < 4) launchy @@ -132,9 +134,6 @@ GEM mail (2.7.0) mini_mime (>= 0.1.1) method_source (0.9.0) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) mini_mime (1.0.0) mini_portile2 (2.4.0) minitest (5.11.3) @@ -143,17 +142,16 @@ GEM nio4r (2.3.1) nokogiri (1.10.1) mini_portile2 (~> 2.4.0) - poltergeist (1.9.0) - capybara (~> 2.1) + poltergeist (1.18.1) + capybara (>= 2.1, < 4) cliver (~> 0.3.1) - multi_json (~> 1.0) websocket-driver (>= 0.2.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) public_suffix (3.0.2) - rack (2.0.5) - rack-test (1.0.0) + rack (2.0.6) + rack-test (1.1.0) rack (>= 1.0, < 3) rails (5.1.6) actioncable (= 5.1.6) @@ -185,6 +183,7 @@ GEM rdoc (4.2.2) json (~> 1.4) ref (2.0.0) + regexp_parser (1.3.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -258,8 +257,8 @@ GEM websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.2.0) + nokogiri (~> 1.8) yard (0.8.7.6) PLATFORMS @@ -270,7 +269,7 @@ DEPENDENCIES bootstrap-sass (= 3.1.1.1) bundler (~> 1.3) byebug - capybara (~> 2.2.0) + capybara (~> 3.13.2) capybara-screenshot (~> 1.0.11) coderay (~> 1.1.0) faker (~> 1.8.7) @@ -280,7 +279,7 @@ DEPENDENCIES jquery-rails (~> 4.3.3) jquery-ui-rails (~> 5.0.5) jquery-ui-themes (~> 0.0.11) - poltergeist (~> 1.9.0) + poltergeist (~> 1.18.0) rails (~> 5.1.0) rake (~> 10.1) rdoc (~> 4.2.0) diff --git a/gemfiles/rails_5.2.gemfile.lock b/gemfiles/rails_5.2.gemfile.lock index e8988a2c..2f2e589a 100644 --- a/gemfiles/rails_5.2.gemfile.lock +++ b/gemfiles/rails_5.2.gemfile.lock @@ -61,12 +61,14 @@ GEM sass (~> 3.2) builder (3.2.3) byebug (10.0.2) - capybara (2.2.1) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) + capybara (3.13.2) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) capybara-screenshot (1.0.21) capybara (>= 1.0, < 4) launchy @@ -138,9 +140,6 @@ GEM marcel (0.3.2) mimemagic (~> 0.3.2) method_source (0.9.0) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) mimemagic (0.3.2) mini_mime (1.0.0) mini_portile2 (2.4.0) @@ -150,17 +149,16 @@ GEM nio4r (2.3.1) nokogiri (1.10.1) mini_portile2 (~> 2.4.0) - poltergeist (1.9.0) - capybara (~> 2.1) + poltergeist (1.18.1) + capybara (>= 2.1, < 4) cliver (~> 0.3.1) - multi_json (~> 1.0) websocket-driver (>= 0.2.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) public_suffix (3.0.2) - rack (2.0.5) - rack-test (1.0.0) + rack (2.0.6) + rack-test (1.1.0) rack (>= 1.0, < 3) rails (5.2.0) actioncable (= 5.2.0) @@ -193,6 +191,7 @@ GEM rdoc (4.2.2) json (~> 1.4) ref (2.0.0) + regexp_parser (1.3.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -266,8 +265,8 @@ GEM websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.2.0) + nokogiri (~> 1.8) yard (0.8.7.6) PLATFORMS @@ -278,7 +277,7 @@ DEPENDENCIES bootstrap-sass (= 3.1.1.1) bundler (~> 1.3) byebug - capybara (~> 2.2.0) + capybara (~> 3.13.2) capybara-screenshot (~> 1.0.11) coderay (~> 1.1.0) faker (~> 1.8.7) @@ -288,7 +287,7 @@ DEPENDENCIES jquery-rails (~> 4.3.3) jquery-ui-rails (~> 5.0.5) jquery-ui-themes (~> 0.0.11) - poltergeist (~> 1.9.0) + poltergeist (~> 1.18.0) rails (~> 5.2.0) rake (~> 10.1) rdoc (~> 4.2.0) diff --git a/spec/acceptance_helper.rb b/spec/acceptance_helper.rb index 47c29bd6..259e2503 100644 --- a/spec/acceptance_helper.rb +++ b/spec/acceptance_helper.rb @@ -16,6 +16,7 @@ require 'capybara-screenshot/rspec' Capybara::Screenshot.prune_strategy = :keep_last_run end +Capybara.server = :webrick # Slow down responses to help debug tests that have race conditions. if ENV['TEST_RESPONSE_DELAY'] diff --git a/spec/features/custom_filters1_request_spec.rb b/spec/features/custom_filters1_request_spec.rb index c9f0b47e..fdd0bcff 100644 --- a/spec/features/custom_filters1_request_spec.rb +++ b/spec/features/custom_filters1_request_spec.rb @@ -1,35 +1,16 @@ # encoding: utf-8 require 'acceptance_helper' -describe 'custom_ordering WiceGrid', type: :request, js: true do +describe 'custom_ordering WiceGrid', type: :feature, js: true do before :each do visit '/custom_filters1' end it 'should have all options' do - within '#g1_f_status' do - expect(page).to have_content('Development') - expect(page).to have_content('Testing') - expect(page).to have_content('Production') - end - - within '#g2_f_status' do - expect(page).to have_content('Development') - expect(page).to have_content('Testing') - expect(page).to have_content('Production') - end - - within '#g3_f_status' do - expect(page).to have_content('development') - expect(page).to have_content('testing') - expect(page).to have_content('production') - end - - within '#g4_f_status' do - expect(page).to have_content('development') - expect(page).to have_content('testing') - expect(page).to have_content('production') - end + expect(page).to have_select('g1_f_status', options: %w(-- Development Testing Production)) + expect(page).to have_select('g2_f_status', options: %w(-- Development Testing Production)) + expect(page).to have_select('g3_f_status', options: %w(-- development testing production)) + expect(page).to have_select('g4_f_status', options: %w(-- development testing production)) end it 'should have expand/collapse' do diff --git a/spec/features/custom_filters2_request_spec.rb b/spec/features/custom_filters2_request_spec.rb index 6a0df628..a08c0806 100644 --- a/spec/features/custom_filters2_request_spec.rb +++ b/spec/features/custom_filters2_request_spec.rb @@ -1,37 +1,15 @@ # encoding: utf-8 require 'acceptance_helper' -describe 'custom_ordering WiceGrid', type: :request, js: true do +describe 'custom_ordering WiceGrid', type: :feature, js: true do before :each do visit '/custom_filters2' end it 'should have all options' do - within '#grid_f_priorities_name' do - expect(page).to have_content('Anecdotic') - expect(page).to have_content('High') - expect(page).to have_content('Low') - expect(page).to have_content('Normal') - expect(page).to have_content('Urgent') - end - - within '#grid_f_status_id' do - expect(page).to have_content('Assigned') - expect(page).to have_content('Cancelled') - expect(page).to have_content('Closed') - expect(page).to have_content('Duplicate') - expect(page).to have_content('New') - expect(page).to have_content('Postponed') - expect(page).to have_content('Resolved') - expect(page).to have_content('Started') - expect(page).to have_content('Verified') - end - - within '#grid_f_project_id' do - expect(page).to have_content('Divine Firmware') - expect(page).to have_content('Super Game') - expect(page).to have_content('Ultimate Website') - end + expect(page).to have_select('grid_f_priorities_name', options: %w(-- Anecdotic High Low Normal Urgent)) + expect(page).to have_select('grid_f_status_id', options: %w(-- Assigned Cancelled Closed Duplicate New Postponed Resolved Started Verified)) + expect(page).to have_select('grid_f_project_id', options: ['--', 'Divine Firmware', 'Super Game', 'Ultimate Website']) end it 'should filter by custom filters' do diff --git a/spec/features/custom_filters3_request_spec.rb b/spec/features/custom_filters3_request_spec.rb index afc9ff57..26540e3b 100644 --- a/spec/features/custom_filters3_request_spec.rb +++ b/spec/features/custom_filters3_request_spec.rb @@ -1,30 +1,14 @@ # encoding: utf-8 require 'acceptance_helper' -describe 'custom_ordering WiceGrid', type: :request, js: true do +describe 'custom_ordering WiceGrid', type: :feature, js: true do before :each do visit '/custom_filters3' end it 'should have all options' do - within '#grid_f_expected_version_id' do - expect(page).to have_content('1.0') - expect(page).to have_content('2.0') - expect(page).to have_content('1.2') - end - - within '#grid_f_versions_name' do - expect(page).to have_content('1.0') - expect(page).to have_content('1.1') - expect(page).to have_content('1.2') - expect(page).to have_content('2.0') - expect(page).to have_content('3.0') - expect(page).to have_content('6.0') - expect(page).to have_content('7.1') - expect(page).to have_content('8.0') - expect(page).to have_content('88.1') - expect(page).to have_content('99.0') - end + expect(page).to have_select('grid_f_expected_version_id', options: %w(-- 1.0 2.0 1.2)) + expect(page).to have_select('grid_f_versions_name', options: %w(-- 1.0 1.1 1.2 2.0 3.0 6.0 7.1 8.0 88.1 99.0)) end it 'should filter by custom fields' do diff --git a/wice_grid.gemspec b/wice_grid.gemspec index e71f85c0..a0061cb4 100644 --- a/wice_grid.gemspec +++ b/wice_grid.gemspec @@ -26,9 +26,9 @@ Gem::Specification.new do |s| s.add_development_dependency('rspec', '~> 3.6.0') s.add_development_dependency('rspec-rails', '~> 3.6.0') s.add_development_dependency('shoulda-matchers', '2.8.0') - s.add_development_dependency('capybara', '~> 2.2.0') + s.add_development_dependency('capybara', '~> 3.13.2') s.add_development_dependency('faker', '~> 1.8.7') - s.add_development_dependency('poltergeist', '~> 1.9.0') + s.add_development_dependency('poltergeist', '~> 1.18.0') s.add_development_dependency('capybara-screenshot', '~> 1.0.11') s.add_development_dependency('selenium-webdriver', '~> 2.51.0')