An open API service indexing awesome lists of open source software.

https://github.com/begriffs/capybara-js

Helpers to wait for, spy on, and stub javascript
https://github.com/begriffs/capybara-js

Last synced: 4 months ago
JSON representation

Helpers to wait for, spy on, and stub javascript

Awesome Lists containing this project

README

          

## JavaScript helpers for Capybara

Fix mysterious timing issues in your tests by waiting for JS variables
to be initialized. Spy on JS methods, or stub methods to prevent default
actions and isolate your tests.

### Usage

```sh
gem install capybara-js
```

Or add it to your Gemfile. Then in your rspec,

```ruby
# wait for something to become defined, in this case jQuery
page.js_wait_for_variable '$'
```