Adding separate step to support old and new layout

pull/6827/head
Gregor Schmidt 13 years ago
parent d1831c452e
commit 7d4b7d3982
  1. 2
      features/fixed_version_by_issue_hierarchy.feature
  2. 10
      features/step_definitions/_when_steps.rb

@ -101,7 +101,7 @@ Feature: The issue hierarchy defines the allowed versions for each issue depende
@javascript
Scenario: Creating a task, via subtask, as a subtask to a story sets the new task's fixed version to the parent's fixed version
When I go to the page of the issue "Story A"
And I follow "Add" within "div#issue_tree"
And I follow the link to add a subtask
And I select "Task" from "issue_tracker_id"
And I fill in "Task 0815" for "issue_subject"
And I press "Create"

@ -170,3 +170,13 @@ end
When /^the request on task "(.+?)" is finished$/ do |task_name|
step 'I wait for AJAX requests to finish'
end
When /^I follow the link to add a subtask$/ do
begin
# new layout
step 'I follow "Add subtask"'
rescue Capybara::ElementNotFound
# old layout
step 'I follow "Add" within "#issue_tree"'
end
end

Loading…
Cancel
Save