From 1d932ccfe53910189406bbb76f391fd911a51768 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 27 Feb 2013 21:50:03 +0100 Subject: [PATCH] fix failing scenario --- features/support/world.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/support/world.rb b/features/support/world.rb index f82d6479..6f36b7c4 100644 --- a/features/support/world.rb +++ b/features/support/world.rb @@ -35,7 +35,8 @@ module TracksStepHelper def submit_form(form_xpath, button_name) handle_js_confirm do - within(:xpath, form_xpath) do + # on calendar page there can be more than 1 occurance of a todo, so we select the first here + within all(:xpath, form_xpath)[0] do click_button(button_name) end wait_for_ajax