fixed tests
This commit is contained in:
parent
c4d48190b6
commit
c801fa3430
|
@ -9,14 +9,13 @@ feature "User", :type => :feature do
|
||||||
scenario "gets asked a question", js: true do
|
scenario "gets asked a question", js: true do
|
||||||
visit "/@#{@user1.screen_name}"
|
visit "/@#{@user1.screen_name}"
|
||||||
|
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}.png"), full: true
|
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true
|
||||||
|
|
||||||
fill_in "qb-question", with: Faker::Lorem.sentence
|
fill_in "qb-question", with: Faker::Lorem.sentence
|
||||||
click_button "Ask"
|
click_button "Ask"
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
reload_page
|
|
||||||
|
|
||||||
page.driver.render Rails.root.join('tmp'), full: full
|
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
||||||
|
|
||||||
expect(page).to have_text("Question asked successfully.")
|
expect(page).to have_text("Question asked successfully.")
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
require 'simplecov'
|
require 'simplecov'
|
||||||
SimpleCov.start
|
SimpleCov.start
|
||||||
|
|
||||||
# require 'capybara/rails'
|
|
||||||
# require 'capybara/rspec'
|
|
||||||
require 'capybara/poltergeist'
|
require 'capybara/poltergeist'
|
||||||
Capybara.default_driver = :poltergeist
|
Capybara.register_driver :poltergeist do |app|
|
||||||
|
Capybara::Poltergeist::Driver.new(app, js_errors: false)
|
||||||
|
end
|
||||||
Capybara.javascript_driver = :poltergeist
|
Capybara.javascript_driver = :poltergeist
|
||||||
|
|
||||||
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
||||||
|
|
Loading…
Reference in New Issue