WHAT IS MAKING THIS ERROR WTF
This commit is contained in:
parent
bda777fe2d
commit
eee53e8f6e
|
@ -25,21 +25,21 @@ feature "Inbox", :devise do
|
||||||
login_as me, scope: :user
|
login_as me, scope: :user
|
||||||
visit root_path
|
visit root_path
|
||||||
expect(page).to have_text('1 new question'.upcase)
|
expect(page).to have_text('1 new question'.upcase)
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true
|
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_1.png"), full: true
|
||||||
|
|
||||||
click_link "Inbox"
|
click_link "Inbox"
|
||||||
expect(page).to have_text(question.content)
|
expect(page).to have_text(question.content, wait: 2)
|
||||||
fill_in "ib-answer", with: Faker::Lorem.sentence
|
fill_in "ib-answer", with: "This is an answer. I'm number i!"
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_2.png"), full: true
|
||||||
|
|
||||||
click_button "Answer"
|
click_button "Answer"
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
expect(page).not_to have_text(question.content, wait: 2)
|
expect(page).to have_text("Successfully answered question.", wait: 2)
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_3.png"), full: true
|
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_3.png"), full: true
|
||||||
|
|
||||||
visit show_user_profile_path(me.screen_name)
|
visit show_user_profile_path(me.screen_name)
|
||||||
expect(page).to have_text(question.content)
|
expect(page).to have_text(question.content)
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_4.png"), full: true
|
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_4.png"), full: true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Scenario: User generates new question
|
# Scenario: User generates new question
|
||||||
|
|
Loading…
Reference in New Issue