Skip to content

Instantly share code, notes, and snippets.

@diegocasmo
Created September 28, 2016 01:15
Show Gist options
  • Save diegocasmo/7eb859f37ad88824b88d1c1a38036d9d to your computer and use it in GitHub Desktop.
Save diegocasmo/7eb859f37ad88824b88d1c1a38036d9d to your computer and use it in GitHub Desktop.
An example step definition to create an order
Given(/^I am logged in as a salesman assigned to "(.*?)", with the following products:$/) do |client, table|
salesman = Support::Salesman.find_or_create
client = Support::Client.new(client)
Support::Salesman.assign_client(client)
Support::Product.assign_products(salesman, table.hashes)
LoginPage.visit.login(salesman)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment