From 669ec0eee72d20a2c84082882d6f450d3c6f8d50 Mon Sep 17 00:00:00 2001 From: Rob H Date: Wed, 23 Apr 2014 12:02:27 +1000 Subject: [PATCH] Fix failing API specs --- spec/features/admin/bulk_order_management_spec.rb | 4 ++-- spec/features/admin/bulk_product_update_spec.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/features/admin/bulk_order_management_spec.rb b/spec/features/admin/bulk_order_management_spec.rb index 9b5ac1dabe..1a227bc6bd 100644 --- a/spec/features/admin/bulk_order_management_spec.rb +++ b/spec/features/admin/bulk_order_management_spec.rb @@ -507,7 +507,7 @@ feature %q{ before :each do visit '/admin/orders/bulk_management' within "tr#li_#{li3.id}" do - click_link li3.variant.options_text + find("a", text: li3.product.name + ": " + li3.variant.options_text).click end end @@ -542,7 +542,7 @@ feature %q{ context "clicking 'Clear' in group buy box" do before :each do - click_link 'Clear' + find("a", text: "Clear").click end it "shows all products and clears group buy box" do diff --git a/spec/features/admin/bulk_product_update_spec.rb b/spec/features/admin/bulk_product_update_spec.rb index 3de9b6f1e1..9403c8cac9 100644 --- a/spec/features/admin/bulk_product_update_spec.rb +++ b/spec/features/admin/bulk_product_update_spec.rb @@ -237,7 +237,7 @@ feature %q{ visit '/admin/products/bulk_edit' - click_link 'New Product' + find("a", text: "New Product").click page.should have_content 'NEW PRODUCT' @@ -783,7 +783,7 @@ feature %q{ select '25', :from => 'perPage' page.all("input[name='product_name']").select{ |e| e.visible? }.all?{ |e| e.value == "page1product" }.should == true - click_link "2" + find("a", text: "2").click page.all("input[name='product_name']").select{ |e| e.visible? }.all?{ |e| e.value == "page2product" }.should == true end @@ -795,7 +795,7 @@ feature %q{ visit '/admin/products/bulk_edit' select '25', :from => 'perPage' - click_link "3" + find("a", text: "3").click select '50', :from => 'perPage' page.first("div.pagenav span.page.current").should have_text "2" page.all("input[name='product_name']", :visible => true).length.should == 1 @@ -869,7 +869,7 @@ feature %q{ describe "clicking the 'Remove Filter' link" do before(:each) do - click_link "Remove Filter" + find("a", text: "Remove Filter").click end it "removes the filter from the list of applied filters" do