Created
October 28, 2010 14:58
-
-
Save jxpx777/651503 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
setup | |
open '/new_store' | |
assert_title 'Agile Online Store' | |
click_and_wait "css=li#product-100 a[href=/new_store/add_to_cart/100?license=SINGLE]" | |
assert_element_present "css=h3:contains(Summary)" | |
assert_text "css=td.order-total", "$39.95 USD" | |
assert_element_present "link=Enter coupon code" | |
assert_text_present "Buy multiple applications and save!" | |
assert_text "css=a[href=/new_store/checkout]", "Check Out Now" | |
click_and_wait "link=Check Out Now" | |
type "transaction[licensee_name]", "John Q. User" | |
# TODO => _partial | |
store_value "transaction[licensee_name]", "current_name" | |
store_value "transaction[licensee_email]", "current_email" | |
check "is_gift" | |
fire_event "is_gift", "change" | |
pause 500 | |
assert_value "css=#transaction_licensee_name", "${current_name}" | |
assert_value "css=#transaction_licensee_email", "${current_email}" | |
assert_element_present "transaction[gift_message]" | |
assert_element_present "transaction[gift_from]" | |
uncheck "is_gift" | |
fire_event "is_gift", "change" | |
# TODO => _partial | |
type "transaction[name_on_card]", "John Q. User" | |
type "transaction[licensee_email]", "[email protected]" | |
type "transaction[card_number]", "4111111111111111" | |
select "transaction[card_expiry_month]", "12 (December)" | |
select "transaction[card_expiry_year]", "2020" | |
type "transaction[address]", "1234 Main Street" | |
type "transaction[city]", "Anywhere" | |
select "transaction[state]", "Texas" | |
type "transaction[zip]", "55555" | |
select "transaction[country]", "United States" | |
uncheck "transaction_subscribe_to_newsletter" | |
submit_and_wait "checkout_form" | |
assert_element_present "link=Place Your Order" | |
assert_element_present "link=Edit" | |
click_and_wait "link=Place Your Order" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment