Fix spec failures - enterprise fee calculator type change, distributor info rich text tests, summarised distribution fee at checkout

This commit is contained in:
Rohan Mitchell
2013-08-19 17:28:00 +10:00
parent 0458f7a6bb
commit 64c9d4254a
3 changed files with 9 additions and 34 deletions

View File

@@ -27,7 +27,7 @@ feature %q{
page.should have_selector "#enterprise_fee_set_collection_attributes_0_enterprise_id"
page.should have_selector "option[selected]", text: 'Packing'
page.should have_selector "input[value='$0.50 / kg']"
page.should have_selector "option[selected]", text: 'Flat Rate (per order)'
page.should have_selector "option[selected]", text: 'Flat Rate (per item)'
page.should have_selector "input[value='#{amount}']"
end

View File

@@ -89,13 +89,6 @@ feature %q{
['Product distribution by Edible garden for Garlic', '$2.00', '']]
page.should have_selector 'span.distribution-total', :text => '$3.00'
# When I check out
click_link 'Checkout'
# Then I should see a summary of my distribution charges
page.should have_selector 'tbody#summary-order-charges td', text: 'Distribution:'
page.should have_selector 'tbody#summary-order-charges td', text: '$3.00'
end
scenario "viewing delivery fees for order cycle distribution" do
@@ -295,18 +288,9 @@ feature %q{
# Distributor details should be displayed
within('fieldset#shipping') do
[@distributor.name,
@distributor.address.address1,
@distributor.address.city,
@distributor.address.zipcode,
@distributor.address.state_text,
@distributor.address.country.name,
@distributor.pickup_times,
@distributor.next_collection_at,
@distributor.contact,
@distributor.phone,
@distributor.email,
@distributor.description,
@distributor.website].each do |value|
@distributor.distributor_info,
@distributor.next_collection_at
].each do |value|
page.should have_content value
end
@@ -319,8 +303,8 @@ feature %q{
# -- Checkout: Delivery
order_charges = page.all("tbody#summary-order-charges tr").map {|row| row.all('td').map(&:text)}.take(2)
order_charges.should == [["Product distribution by Edible garden for Fuji apples:", "$1.00"],
["Product distribution by Edible garden for Garlic:", "$2.00"]]
order_charges.should == [["Shipping:", "$0.00"],
["Distribution:", "$3.00"]]
click_checkout_continue_button
# -- Checkout: Payment

View File

@@ -44,18 +44,9 @@ feature %q{
within '#product-distributor-details' do
[d.name,
d.address.address1,
d.address.city,
d.address.zipcode,
d.address.state_text,
d.address.country.name,
d.pickup_times,
d.next_collection_at,
d.contact,
d.phone,
d.email,
d.description,
d.website].each do |value|
d.distributor_info,
d.next_collection_at
].each do |value|
page.should have_content value
end