Last active
January 3, 2016 03:48
-
-
Save morr/8404284 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe 'backbone', js: true do | |
| it 'success auth' do | |
| visit new_user_registration_path | |
| click_link 'Войдите' | |
| fill_backbone_field '#auth .sign-in #user_email', user.email | |
| fill_backbone_field '#auth .sign-in #user_password', user.password | |
| page.evaluate_script "$('#auth .sign-in .submit').trigger('click')" | |
| # shows flash | |
| page.should have_selector '.flash.success' | |
| # authorized | |
| page.should have_content "Личный кабинет" | |
| # stays on the same page | |
| current_path.should eq path | |
| end | |
| end |
Author
Author
spec_helper.rb
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist_with_long_timeout do |app|
Capybara::Poltergeist::Driver.new(app, timeout: 60)
end
Capybara.javascript_driver = :poltergeist_with_long_timeout
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/spec/support/feature_helpers.rb