Adds cukes for responsible filter.

pull/465/head
Martin Czuchra 11 years ago
parent 52f171faa6
commit 9c25e77b5e
  1. 14
      features/step_definitions/timelines_when_steps.rb
  2. 21
      features/timelines/timeline_view_with_filters.feature

@ -74,6 +74,20 @@ When (/^I set the first level grouping criteria to "(.*?)" for the timeline "(.*
page.execute_script("jQuery('#content form').submit()")
end
When (/^I show only work packages which have the responsible "(.*?)"$/) do |responsible|
timeline_name = @timeline_name
project_name = @project.name
steps %Q{
When I go to the edit page of the timeline "#{timeline_name}" of the project called "#{project_name}"
}
responsible = User.find_by_login(responsible)
page.execute_script(<<-JavaScript)
jQuery('#timeline_options_planning_element_responsibles').val('#{responsible.id}')
jQuery('#content form').submit()
JavaScript
end
When (/^I show only work packages which have the type "(.*?)"$/) do |type|
timeline_name = @timeline_name
project_name = @project.name

@ -91,3 +91,24 @@ Feature: Timeline view with filter tests
Then I should see the work package "Hubert Farnsworth's third Birthday" in the timeline
And I should not see the work package "Second year" in the timeline
@javascript
Scenario: The timeline w/ responsibles filters renders properly
Given there is 1 user with:
| Login | hubert |
| Firstname | Hubert |
| Lastname | Farnsworth |
And there are the following work packages in project "Space Pilot 3000":
| Subject | Start date | Due date | Responsible | Parent |
| Hubert Farnsworth's Birthday | 2841-04-09 | 2841-04-09 | hubert | |
| Second year | 3000-01-01 | 3000-01-05 | | |
| Hubert Farnsworth's second Birthday | 2842-04-09 | 2842-04-09 | hubert | Second year |
| Hubert Farnsworth's third Birthday | 2843-04-09 | 2843-04-09 | hubert | Second year |
And I am working in the timeline "Storyboard" of the project called "Space Pilot 3000"
When I go to the page of the timeline of the project called "Space Pilot 3000"
And I show only work packages which have the responsible "hubert"
And I wait for timeline to load table
Then I should see the work package "Hubert Farnsworth's Birthday" in the timeline
Then I should see the work package "Hubert Farnsworth's second Birthday" in the timeline
Then I should see the work package "Hubert Farnsworth's third Birthday" in the timeline
And I should not see the work package "Second year" in the timeline

Loading…
Cancel
Save