2016-03-07 19:52:19 -05:00
|
|
|
# frozen_string_literal: true
|
2018-02-28 19:11:41 -05:00
|
|
|
|
2016-10-04 14:10:29 -04:00
|
|
|
Capybara::SpecHelper.spec '#go_forward', requires: [:js] do
|
2013-10-05 14:23:51 -04:00
|
|
|
it "should fetch a response from the driver from the previous page" do
|
|
|
|
@session.visit('/')
|
2013-11-14 12:43:36 -05:00
|
|
|
expect(@session).to have_content('Hello world!')
|
2013-10-05 14:23:51 -04:00
|
|
|
@session.visit('/foo')
|
2013-11-14 12:43:36 -05:00
|
|
|
expect(@session).to have_content('Another World')
|
2013-10-05 14:23:51 -04:00
|
|
|
@session.go_back
|
2013-11-14 12:43:36 -05:00
|
|
|
expect(@session).to have_content('Hello world!')
|
2013-10-05 14:23:51 -04:00
|
|
|
@session.go_forward
|
2013-11-14 12:43:36 -05:00
|
|
|
expect(@session).to have_content('Another World')
|
2013-10-05 14:23:51 -04:00
|
|
|
end
|
|
|
|
end
|