Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
step files inadvertently omitted from previous commits
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'spec' | ||
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..') | ||
require 'depot' | ||
|
||
Given 'my cart is empty' do | ||
empty_cart_page.goto | ||
end | ||
When /^I add to my cart (.*)$/ do | book_title | | ||
store_page.goto | ||
store_page.add_to_cart_button(book_title).click | ||
end | ||
Then 'the cart is displayed' do | ||
@browser.url.should == your_cart_page.full_url | ||
page_heading.should == 'Your Pragmatic Cart' | ||
end | ||
|
||
Then /^the order total is (.*)$/ do | total | | ||
your_cart_page.total.should == total | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'spec' | ||
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..') | ||
require 'depot' | ||
|
||
SITE = Depot::Depot.new | ||
at_exit {SITE.close_browser_and_raise_if nil} | ||
|
||
World do | ||
SITE | ||
end |