Update cukes for wp columns dialog (with select2)

Unmark two scenarios as wip, making them toolbar/modal dialog-aware.
Initially update step definitions for adding columns with select2.

This partially reverts 97c9b9cac6

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/1387/merge
Alex Coles 11 years ago
parent cc5bedac94
commit 04739c637c
  1. 37
      features/step_definitions/general_steps.rb
  2. 11
      features/work_packages/index_move_columns.feature
  3. 8
      features/work_packages/index_sums.feature

@ -252,26 +252,35 @@ Given /^the [iI]ssue "([^\"]*)" has (\d+) [tT]ime(?: )?[eE]ntr(?:ies|y) with the
end
Given /^I select to see [cC]olumn "([^\"]*)"$/ do |column_name|
steps %Q{
When I select \"#{column_name}\" from \"available_columns\"
When I press \"\"
}
within('#s2id_selected_columns_new') do
find('input.select2-input').click
end
s2_result = find('ul.select2-results li', text: column_name)
s2_result.click
end
Given /^I select to not see [cC]olumn "([^\"]*)"$/ do |column_name|
steps %Q{
When I select \"#{column_name}\" from \"selected_columns\"
When I press \"\"
}
pending
end
Given /^I select to see [cC]olumn(?:s)?$/ do |table|
params = "?set_filter=1&" + table.raw.collect(&:first).collect do |name|
page.source =~ /<option value="(.*?)">#{name}<\/option>/
column_name = $1 || name.gsub(" ", "_").downcase
"query[column_names][]=#{column_name}"
end.join("&")
visit(current_path + params)
result = []
table.raw.each do |_perm|
perm = _perm.first
unless perm.blank?
result.push(perm)
end
end
result.each do |column_name|
within('#s2id_selected_columns_new') do
find('input.select2-input').click
end
s2_result = find('ul.select2-results li', text: column_name)
s2_result.click
end
end
Given /^I start debugging$/ do

@ -64,18 +64,17 @@ Feature: Disabled done ratio on the work package index
And I am already logged in as "bob"
@javascript @wip
@javascript
Scenario: Author column should be displayed when Author is moved to selected columns
When I go to the work packages index page of the project "project1"
And I click the toolbar button named "Filter"
And I click "Options"
And I choose "Columns" from the toolbar "settings" dropdown
And I select to see column "Author"
And I click "Apply"
Then I should see "Author" within ".workpackages-table"
@javascript @wip
@javascript
Scenario: Subject column should not be displayed when Subject is moved out of selected columns
When I go to the work packages index page of the project "project1"
And I click the toolbar button named "Filter"
And I click "Options"
And I choose "Columns" from the toolbar "settings" dropdown
And I select to not see column "Subject"
Then I should not see "Subject" within ".workpackages-table"

@ -64,11 +64,11 @@ Feature: Calculated sums on the work package index
And I am already logged in as "bob"
@javascript @wip
@javascript
Scenario: Total sum of summable column should be displayed when display sums checkbox is checked
When I go to the work packages index page of the project "project1"
And I click the toolbar button named "Filter"
And I click "Options"
And I choose "Columns" from the toolbar "settings" dropdown
And I select to see column "Estimated time"
And I check "display_sums"
And I click "Apply"
And I choose "Display sums" from the toolbar "settings" dropdown
Then I should see "26" within ".sum.group.all"

Loading…
Cancel
Save