System Specs
Last updated
Was this helpful?
Last updated
Was this helpful?
Background
"System tests" are the new replacement for "feature specs" in modern Rails apps. Also, the new driver Ferrum-Cuprite driver does a similar job to Selenium, but it's radically faster and the tests are way more stable (less flaky specs). See also .
Migration from Feature specs into System specs
This is a task which is in progress . The process involves these steps :
move spec files from spec/features to into spec/system
replace require "spec_helper"
with require "system_helper"
Use RSpec.describe
to define system specs, instead of RSpec.feature
Replace the scenario
alias in previous feature specs with the standard it
syntax (this appears to be optional)
Additionally, other changes may be required. For example:
some helper methods were created considered Selenium; these won't work now and need to be adapted to
some syntax might not work under system specs, for example background do
blocks need to be replaced with before do
.
the syntax for manipulating cookies with Ferrum is found ; see also .
other issues will certainly come up and will be added here
References