Last active
August 29, 2015 14:12
-
-
Save DivineDominion/ae672f24be394bac4fae 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
| feature 'Contact form POST without Ajax', :js => false do | |
| context 'without name' do | |
| it 'shows the index' do | |
| visit_landing_page | |
| within('#request-form') do | |
| fill_in 'request-email', :with => 'test@test.de' | |
| fill_in 'request-anliegen', :with => 'Test' | |
| fill_in 'request-seiten', :with => '123' | |
| end | |
| click_button 'Anfragen' | |
| expect(current_path).to eq index_path | |
| end | |
| end | |
| end |
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
| ... | |
| capybara (2.4.4) | |
| capybara-selenium (0.0.6) | |
| capybara-webkit (1.3.1) | |
| rspec (3.1.0) | |
| rspec-core (3.1.7) | |
| rspec-expectations (3.1.2) | |
| rspec-mocks (3.1.3) | |
| rspec-support (3.1.2) | |
| selenium-webdriver (2.44.0) | |
| ... |
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
| 12:53:39 - INFO - Running: spec/feature/contact_spec.rb | |
| .F..... | |
| Failures: | |
| 1) Contact form POST without Ajax without name shows the index | |
| Failure/Error: fill_in 'request-email', :with => 'test@test.de' | |
| Selenium::WebDriver::Error::JavascriptError: | |
| waiting for evaluate.js load failed | |
| # [remote server] file:///var/folders/62/8k21681d08z9lhq8h433z3rh0000gn/T/webdriver-profile20150102-4977-hhipef/extensions/fxdriver@googlecode.com/components/driver-component.js:9589:in `injectAndExecuteScript/n' | |
| # [remote server] file:///var/folders/62/8k21681d08z9lhq8h433z3rh0000gn/T/webdriver-profile20150102-4977-hhipef/extensions/fxdriver@googlecode.com/components/driver-component.js:554:in `fxdriver.Timer.prototype.runWhenTrue/g' | |
| # [remote server] file:///var/folders/62/8k21681d08z9lhq8h433z3rh0000gn/T/webdriver-profile20150102-4977-hhipef/extensions/fxdriver@googlecode.com/components/driver-component.js:548:in `fxdriver.Timer.prototype.setTimeout/<.notify' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:640:in `raw_execute' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:618:in `execute' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:339:in `executeScript' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:193:in `execute_script' | |
| # /Users/ctm/.rvm/gems/ruby-2.0.0-p598/gems/capybara-2.4.4/lib/capybara/selenium/node.rb:46:in `set' |
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
| require 'capybara/webkit' | |
| require 'capybara/rspec' | |
| require 'selenium-webdriver' | |
| Capybara.register_driver :selenium_firefox_nojs do |app| | |
| profile = Selenium::WebDriver::Firefox::Profile.new | |
| profile["javascript.enabled"] = false | |
| Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile) | |
| end | |
| Capybara.configure do |config| | |
| config.run_server = false | |
| config.app_host = 'http://lekt.php.local' | |
| config.javascript_driver = :webkit | |
| config.default_driver = :selenium_firefox_nojs | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment