You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a feature test fails, the configuration in rails_helper.rb is used to attempt to make a screenshot (which can be helpful for diagnosing a failing browser-based feature spec). The Capybara screenshot interface seems to have changed, so the call for creating a screenshot throws a NoMethodError. For example, the second part of this failure output:
1) Assigned Articles view lets users submit feedback about articles
Got 0 failures and 2 other errors:
1.1) Failure/Error: find('textarea.feedback-form').fill_in with: 'This is a great article!'
Capybara::ElementNotFound:
Unable to find css "textarea.feedback-form"
# ./spec/features/assigned_articles_spec.rb:26:in `block (3 levels) in <top (required)>'
# ./spec/features/assigned_articles_spec.rb:22:in `block (2 levels) in <top (required)>'
1.2) Failure/Error: Capybara::Screenshot.new.screenshot_and_save_page if example.exception
NoMethodError:
undefined method `new' for Capybara::Screenshot:Module
Capybara::Screenshot.new.screenshot_and_save_page if example.exception
^^^^
# ./spec/rails_helper.rb:101:in `block (2 levels) in <top (required)>'
Fix this so that screenshots are properly generated when a feature spec fails.
The text was updated successfully, but these errors were encountered:
What is happening?
When a feature test fails, the configuration in rails_helper.rb is used to attempt to make a screenshot (which can be helpful for diagnosing a failing browser-based feature spec). The Capybara screenshot interface seems to have changed, so the call for creating a screenshot throws a NoMethodError. For example, the second part of this failure output:
Fix this so that screenshots are properly generated when a feature spec fails.
The text was updated successfully, but these errors were encountered: