GithubHelp home page GithubHelp logo

jfirebaugh / bermuda Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 5.0 1.5 MB

Cucumber step definitions for testing jQuery UI widget interactions with capybara

Home Page: https://rubygems.org/gems/bermuda

License: MIT License

Ruby 0.52% JavaScript 99.48%

bermuda's Introduction

bermuda

Continuing in the naming tradition established by Aruba, Bermuda provides cucumber steps for driving out web applications which use jQuery UI widgets.

Usage

gem install bermuda

Then, just require the library in one of your ruby files under features/support

require 'bermuda/cucumber'

You now have a bunch of step definitions that you can use in your features. Look at aruba/cucumber.rb to see all the step definitions. Look at features/*.feature for examples (which are also testing Bermuda itself).

Selector Helpers

Bermuda provides some selector helpers that work in concert with Bodaniel Jeanes’s selector helpers extension to cucumber-rails:

http://github.com/aslakhellesoy/cucumber-rails/pull/63

First, make sure your web_steps.rb is set up to support selector helpers. Follow the steps outlined in Bo’s blog post:

http://bjeanes.com/2010/09/19/selector-free-cucumber-scenarios

Then add the following lines to your selectors.rb:

when /the "([^"]+)" accordion section/
  [:xpath, Bermuda::XPath.accordion_content($1)]
when /the "([^"]+)" dialog/
  [:xpath, Bermuda::XPath.dialog($1)]
when /the "([^"]+)" tab/
  [:xpath, Bermuda::XPath.tab_content($1)]

Now you can write steps such ‘Then I should see “foo” within the “bar” accordion section` and `When I click “Save” within the “Save Changes” dialog`.

Copyright © 2010 John Firebaugh. See LICENSE for details.

bermuda's People

Contributors

jfirebaugh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bermuda's Issues

Support for Cucumber 0.10.0

Could you add support for Cucumber 0.10.0?
I am getting

can't activate cucumber (~> 0.9.2, runtime) for ["bermuda-0.0.2"], already activated cucumber-0.10.0 for

Errors ...
Greetings, Hannes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.