When navigating back to a page that was received from a POST request, undesired side effects may happen. Therefore, modern...
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
When testing code that uses pushState / replaceState, your browser will appear to navigate away from http://localhost:3000/specs (or wherever...
Run bundle update cucumber capybara cucumber-rails to update to the newest versions. Backup your features/support/path.rb to be able to...
This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. This setup allows...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
Cucumber will clean up files you've uploaded in your Cucumber features automatically with the attached code. Put the file...
RSpec::Matchers.define :be_naturally_sorted do match do |array| array == array.natural_sort end end See RSpec: Where to put custom...
This step will pass if the specified select is sorted. Then /^the "(.*?)" select should be sorted$/ do |label, negate|
The benefit of the Rails asset pipeline is that it compiles your stylesheets and javascripts to a single file, respectively...
Option 0: Download from the official page (preferred) Open https://googlechromelabs.github.io/chrome-for-testing/ In Section "Stable" > chromedriver / linux64 > Download ZIP from...
Starting Terminator with split screens is quite simple: Just store a layout and start Terminator with the --layout option.
A very clever hack to parse a structured URL object is to create a element and set its href to...
This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. Firefox will not...
Using this gem I could get JSON generation from a large, nested Ruby hash down from 200ms to 2ms.
Restangular can make use of $http's built-in response cache. # Cache response for single request Restangular.one('accounts', 123).withHttpConfig...
To bind an HTML value to ng-bind-html, you need to mark it as "trusted" first. Among other ways...
Firefox 5.0.1, which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here...
Just install the texlive-xetex package: sudo apt-get install texlive-xetex Running integration tests without texlive-xetex will produce...
JavaScript structures that include circular references can't be serialized with a"plain" JSON.stringify. Example: a = { name: 'Groucho' };
Nice tutorial about packaging Ruby bindings to your API in a Ruby gem, with tests using VCR casettes.
In Thunderbird, you can set custom font faces and sizes for reading plain-text e-mails. However, Thunderbird sometimes "randomly...
There are different ways to run rake: On Rails 4.1+ projects, you have Spring and its binstubs which dramatically improve...
Let's say you have two screens: Show a given project Show a report for all projects Ideally you want...