Coder Social home page Coder Social logo

bragi / cucumber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cucumber/cucumber-ruby

3.0 3.0 3.0 4.46 MB

BDD that talks to domain experts first and code second

Home Page: http://cukes.info/

License: MIT License

Tcl 0.02% Python 0.20% Ruby 99.78%

cucumber's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cucumber's Issues

Page element matching API

Add a nice page element matching API.

Cucumber generates file features/step_definitions/web_steps.rb. It contains steps in form:

I should see "Hello World"
I should see "Hello World" within "table.users"

This allows to search for given text only. Second option is worse as it bleeds through HTML semantics to domain experts (not likely interested in HTML/CSS details).

Instead provide steps that allow to write:

I should see user list

To allow developers easily tell what 'user list' is in terms of HTML/CSS selectors introduce new file called features/support/page_elements.rb. In this file allow developer to match page element names to HTML/CSS selectors using syntax:

PageElement /user list/ do
    have_tag("table.users")
end
PageElement /welcome text/ do
    have_tag("#flash .notice", "Hello world")
end

Nice paths API

Cucumber generates features/support/paths.rb file. This file contains NavigationHelpers module with a single method called path_to.

Make this helper part of cucumber distribution (and not generated code). Generate paths.rb file for new installations. Allow to use following API in this file:

Path /^admin details$/ do
  %r{/administration/admins/\d+}
end

Path /^administration company edition page for "([^\"]*)"$/ do |name|
  edit_administration_company_path(Company.find_by_name(name))
end

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.