diff --git a/spec/features/admin/orders_spec.rb b/spec/features/admin/orders_spec.rb index 908ce4042e..bb38e5d8ba 100644 --- a/spec/features/admin/orders_spec.rb +++ b/spec/features/admin/orders_spec.rb @@ -95,7 +95,7 @@ feature %q{ # click the 'capture' link for the order page.find("[data-action=capture][href*=#{@order.number}]").click - flash_message.should == "Payment Updated" + page.should have_content "Payment Updated" # check the order was captured @order.reload diff --git a/spec/features/consumer/shopping/shopping_spec.rb b/spec/features/consumer/shopping/shopping_spec.rb index 7a67942648..e70377cffc 100644 --- a/spec/features/consumer/shopping/shopping_spec.rb +++ b/spec/features/consumer/shopping/shopping_spec.rb @@ -171,11 +171,10 @@ feature "As a consumer I want to shop with a distributor", js: true do fill_in "variants[#{variant.id}]", with: 6 fill_in "variant_attributes[#{variant.id}][max_quantity]", with: 7 page.should have_in_cart product.name + + wait_until { !cart_dirty } + li = Spree::Order.order(:created_at).last.line_items.order(:created_at).last - while li == nil - sleep 0.1 - li = Spree::Order.order(:created_at).last.line_items.order(:created_at).last - end li.max_quantity.should == 7 li.quantity.should == 6 end diff --git a/spec/requests/shop_spec.rb b/spec/requests/shop_spec.rb index 7f4f4395e6..c13cfc675f 100644 --- a/spec/requests/shop_spec.rb +++ b/spec/requests/shop_spec.rb @@ -4,7 +4,7 @@ describe "Shop API" do include ShopWorkflow describe "filtering products" do - let(:distributor) { create(:distributor_enterprise) } + let(:distributor) { create(:distributor_enterprise, with_payment_and_shipping: true) } let(:supplier) { create(:supplier_enterprise) } let(:oc1) { create(:simple_order_cycle, distributors: [distributor], coordinator: create(:distributor_enterprise), orders_close_at: 2.days.from_now) } let(:p1) { create(:simple_product, on_demand: false) }