From fd47756e2f53e89ebf2c805b0cfb50273b5ff7cf Mon Sep 17 00:00:00 2001 From: Matt-Yorkley Date: Mon, 5 Nov 2018 11:19:57 +0000 Subject: [PATCH] Remove workaround in failing feature spec Removed an old workaround that clicked a button multiple times. This was no longer working and causing the spec to fail. --- spec/features/admin/orders_spec.rb | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/spec/features/admin/orders_spec.rb b/spec/features/admin/orders_spec.rb index 744b328157..1c4aa80a74 100644 --- a/spec/features/admin/orders_spec.rb +++ b/spec/features/admin/orders_spec.rb @@ -88,7 +88,7 @@ feature %q{ quick_login_as_admin visit '/admin/orders' - click_edit + click_icon :edit targetted_select2_search @product.name, from: '#add_variant_id', dropdown_css: '.select2-drop' @@ -111,7 +111,7 @@ feature %q{ uncheck 'Only show complete orders' page.find('a.icon-search').click - click_edit + click_icon :edit select2_select d.name, from: 'order_distributor_id' select2_select oc.name, from: 'order_order_cycle_id' @@ -336,21 +336,4 @@ feature %q{ expect(o.order_cycle).to eq order_cycle1 end end - - # Working around intermittent click failing - # Possible causes of failure: - # - the link moves - # - the missing content (font icon only) - # - the screen is not big enough - # However, some operations before the click or a second click on failure work. - # - # A lot of people had similar problems: - # https://github.com/teampoltergeist/poltergeist/issues/520 - # https://github.com/thoughtbot/capybara-webkit/issues/494 - def click_edit - click_result = click_icon :edit - unless click_result['status'] == 'success' - click_icon :edit - end - end end