I'm very new to Capybara and have also never used Selenium before. I'm doing a ruby on rails project on MacOSX and for whatever reason, a browser window never opens when I run my test.  My stack is: Capybara, Selenium, Rspec, Ruby on Rails. M...
I implemented following behavior for a input field: If the user clicks on the field it will set the whole input-value as selection;  $('.my_div input').on('click', function(event){     this.setSelectionRange(0, this.value.length);   }...
I'm trying to test some JS functionality with rspec and capybara-webkit.   I need to sign in with google on the client side.  <script src="https://apis.google.com/js/client.js"></script>  function auth() {        var config =...
I have a test that checks if, after the user chooses an option from the autocomplete suggestions, the path has changed. I'm testing with Capybara on Poltergeist. However, presumably because I'm triggering the page change trough JS, I have to...
I am running tests that starts by logging in a user using the login form. It successfully opens Firefox, navigates to the login form and fills in the fields, but when it clicks the 'Login' button, it hangs indefinitely. When I quit Firefox I...
When running tests in a Rails (5) app, let's say controller rspecs for example,  you need to have all external frontend dependencies available - anything that's included from application.js or application.css is needed to run these tests, oth...
I have some current feature specs in rspec that currently test some javascript functionality. In those libraries, I am using Modernizr to detect primarily just touchevents. Since I am using Poltergeist and PhantomJS, Modernizr.touchevents always retu...
I think I've met a race condition when I visit some page, fill the form and visit another page after this. Here is full spec.  describe "Dashboard", js: true do   it 'should be displayed for logged in writer' do     # sign_in...
How can I write a test that ensures a couple of fields are hidden when toggled off but visible when toggled on?   My current tests are passing where they shouldn't be. As you can see below, I've tried both have_field and xpath variations to t...
I just learned some time ago that Capybara spins up a separate server and DB connection for Javascript tests, which means DB data you set up in a before block is not available during the test.  As described in this popular article, the app is configu...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.