Permalink
Browse files

Still using chrome to do integration test.

  • Loading branch information...
Eric-Guo committed Apr 15, 2017
1 parent 3143e93 commit 8f5df2358e7ee9c9a65d0412e0299e4f14659564
Showing with 11 additions and 11 deletions.
  1. +1 −1 Gemfile
  2. +9 −6 Gemfile.lock
  3. +1 −2 test/application_system_test_case.rb
  4. +0 −1 test/integration/home_test.rb
  5. +0 −1 test/integration/new_product_test.rb
View
@@ -37,7 +37,7 @@ group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13.0'
gem 'poltergeist'
gem 'selenium-webdriver'
gem 'faker'
end
View
@@ -61,7 +61,8 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
cliver (0.3.2)
childprocess (0.6.3)
ffi (~> 1.0, >= 1.0.11)
concurrent-ruby (1.0.5)
erubi (1.6.0)
execjs (2.7.0)
@@ -92,10 +93,6 @@ GEM
nio4r (2.0.0)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
poltergeist (1.14.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
public_suffix (2.0.5)
puma (3.8.2)
rack (2.0.1)
@@ -129,7 +126,12 @@ GEM
rb-inotify (0.9.8)
ffi (>= 0.5.0)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sass (3.4.23)
selenium-webdriver (3.3.0)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
spring (2.0.1)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
@@ -157,6 +159,7 @@ GEM
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket (1.2.4)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
@@ -172,10 +175,10 @@ DEPENDENCIES
faker
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
poltergeist
puma (~> 3.7)
rails (~> 5.1.0.rc1)
sass-rails!
selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
@@ -1,6 +1,5 @@
require 'test_helper'
require 'capybara/poltergeist'
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :poltergeist, using: :poltergeist, screen_size: [1400, 1400]
driven_by :selenium, using: :chrome, screen_size: [700, 700]
end
@@ -3,7 +3,6 @@
class HomeTest < ApplicationSystemTestCase
test 'loads correctly' do
visit '/'
assert_equal 200, page.status_code
assert_title 'ProductHunt'
assert page.has_content?('Products')
end
@@ -10,7 +10,6 @@ class NewProductTest < ApplicationSystemTestCase
# Should be redirected to Home with new product
assert_equal product_path(Product.last), page.current_path
assert_equal 200, page.status_code
assert page.has_content?('Change your life: Learn to code')
end
end

0 comments on commit 8f5df23

Please sign in to comment.