Sha256: 5c25c0aa13a9b60a9ee8ae33c8d86328d0a0e6f2876f4d5ddb56b0eeda419ef0

Contents?: true

Size: 1.52 KB

Versions: 30

Compression:

Stored size: 1.52 KB

Contents

module Taza
  # Flows provide a way to write and manage common actions on a site.
  # For instance, on an e-commerce site you may have multiple tests where a user is supposed to create a 
  # new account and add a product to the shopping bag. In this case you could have two flows. create_an_account 
  # and add_product_to_bag.
  #
  # Here's how you would get this started where your site is called Widgets of the Future:
  #   $ ./script/generate flow create_an_account widgets_of_the_future
  #   $ ./script/generate flow add_product_to_bag widgets_of_the_future
  #
  #   This will generate flows for you in lib/sites/widgets_of_the_future/flows/
  #
  #   From here you can create the logic needed to perform these flows without ever referencing a browser object:
  #
  #   module WidgetsOfTheFuture
  #     class WidgetsOfTheFuture < Taza::Site
  #       def create_an_account_flow(params={})
  #         home_page.create_an_account_link.click
  #         create_an_account_page do |cap|
  #           cap.email.set params[:email]
  #           cap.password.set params[:password]
  #           cap.submit.click
  #         end
  #       end
  #     end
  #   end
  #
  #
  #   Then inside a spec or test you could run this flow like:
  #
  #   describe "Widgets of the Future" do
  #     it "should do widgety things so that we can make more monies" do
  #       WidgetsOfTheFuture.new do |w|
  #         w.create_an_account_flow :email => "i.am@the.widget.store.com", :password => "secret"
  #       end
  #     end
  #   end
  class Flow
  end
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
taza-3.0.0 lib/taza/flow.rb
taza-2.1.0 lib/taza/flow.rb
taza-2.0 lib/taza/flow.rb
taza-1.0 lib/taza/flow.rb
bret-watircraft-0.4.0 lib/taza/flow.rb
bret-watircraft-0.4.1 lib/taza/flow.rb
bret-watircraft-0.4.2 lib/taza/flow.rb
bret-watircraft-0.4.3 lib/taza/flow.rb
bret-watircraft-0.4.4 lib/taza/flow.rb
bret-watircraft-0.4.5 lib/taza/flow.rb
bret-watircraft-0.5.0 lib/taza/flow.rb
makevoid-taza-0.8.6 lib/taza/flow.rb
scudco-taza-0.8.1 lib/taza/flow.rb
scudco-taza-0.8.3 lib/taza/flow.rb
scudco-taza-0.8.4 lib/taza/flow.rb
scudco-taza-0.8.5 lib/taza/flow.rb
scudco-taza-0.8.6 lib/taza/flow.rb
scudco-taza-0.8.7 lib/taza/flow.rb
taza-0.9.2.1 lib/taza/flow.rb
taza-0.9.2.0 lib/taza/flow.rb