more features for group removal

pull/6827/head
jwollert 14 years ago
parent 2bf87b32bf
commit 2993a10f99
  1. 10
      features/filter.feature
  2. 17
      features/grouping.feature
  3. 6
      features/step_definitions/custom_steps.rb

@ -54,6 +54,16 @@ Feature: Filter
And "2" should be selected for "user_id_arg_1_val"
And "!" should be selected for "operators_user_id"
@javascript
Scenario: A click on clear enables the option in the Add-Filter-Selectbox
Given there is a standard cost control project named "First Project"
And I am logged in as "controller"
And I am on the Cost Reports page for the project called "First Project"
Then "user_id" should not be selectable from "add_filter_select"
And filter "user_id" should be visible
When I click on "Clear"
Then "user_id" should be selectable from "add_filter_select"
@javascript
Scenario: Setting a Filter disables the option in the Add-Filter-Selectbox
Given there is a standard cost control project named "First Project"

@ -34,6 +34,23 @@ Feature: Groups
Then I should see "Project" within "select[@id='group_by_rows']"
And I should not see "Project" within "select[@id='group_by_container']"
@javascript
Scenario: Groups can be removed from rows and columns
Given there is a standard cost control project named "First Project"
And I am logged in as "controller"
And I am on the Cost Reports page for the project called "First Project"
And I click on "Clear"
And I group columns by "Issue"
And I group rows by "Project"
Then I should see "Issue" within "select[@id='group_by_columns']"
And I should see "Project" within "select[@id='group_by_rows']"
When I remove "Project" from rows
And I remove "Issue" from columns
Then I should not see "Issue" within "select[@id='group_by_columns']"
And I should not see "Project" within "select[@id='group_by_rows']"
And I should see "Project" within "select[@id='group_by_container']"
And I should see "Issue" within "select[@id='group_by_container']"
@javascript
Scenario: Groups get restored after sending a query
Given there is a standard cost control project named "First Project"

@ -67,3 +67,9 @@ Given /^I group (rows|columns) by "([^"]*)"/ do |target, group|
When %{I select "#{group}" from "group_by_container"}
find(:xpath, "//input[@class='buttons group_by move #{destination}']").click
end
Given /^I remove "([^"]*)" from (rows|columns)/ do |group, source|
movement = source == "rows" ? "moveRight" : "moveDown"
When %{I select "#{group}" from "group_by_#{source}"}
find(:xpath, "//input[@class='buttons group_by move #{movement}']").click
end

Loading…
Cancel
Save