Probably we can use some trick here from capybara integration specs to ensure that ajax call is complete (in case if Pinterest uses jQuery) (https://coderwall.com/p/aklybw)? This approach is more complex then `sleep 1` and if `sleep 1` works well, please skip the message.

```ruby
Timeout.timeout(TIMEOUT) do
  sleep 1 until evaluate_script('jQuery.active') == 0
end
```