From c8fb7e02ac96f26484322f0edf0a4a36ab5d13e2 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Wed, 29 May 2013 09:02:39 +0200 Subject: [PATCH] attempts to achieve a more reliant edit_via_modal cuke --- features/step_definitions/modal_steps.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/features/step_definitions/modal_steps.rb b/features/step_definitions/modal_steps.rb index 392b7b9d51..bf56436233 100644 --- a/features/step_definitions/modal_steps.rb +++ b/features/step_definitions/modal_steps.rb @@ -7,6 +7,16 @@ When(/^I open the modal window for the story "(.*?)"$/) do |subject| end When(/^I switch the modal window into edit mode$/) do - click_link("Update") + modal = find(".modal", :visible => true) + + within(modal) do + click_link("Update") + end + + safeguard_backlogs_modal_in_edit_mode +end + +def safeguard_backlogs_modal_in_edit_mode + find_field("issue[description]", :visible => true) end