diff --git a/app/views/time_entries/reports/show.html.erb b/app/views/time_entries/reports/show.html.erb index 4d4544f17d..741cfe38c2 100644 --- a/app/views/time_entries/reports/show.html.erb +++ b/app/views/time_entries/reports/show.html.erb @@ -60,10 +60,14 @@ See doc/COPYRIGHT.rdoc for more details.
<%= styled_label_tag :criterias, "#{l(:button_add)}:" %> - <%= styled_select_tag('criterias[]', options_for_select([[]] + (@available_criterias.keys - @criterias).collect{|k| [l_or_humanize(@available_criterias[k][:label]), k]}), - style: 'width: 200px', - id: nil, - disabled: (@criterias.length >= 3), id: "criterias") %> + <% available_criterias = [[]] + (@available_criterias.keys - @criterias).collect{ |k| + [l_or_humanize(@available_criterias[k][:label]), k] + } + %> + <%= styled_select_tag('criterias[]', options_for_select(available_criterias), + style: 'width: 200px', + id: "criterias", + disabled: (@criterias.length >= 3)) %>
diff --git a/features/issues/time_entries.feature b/features/issues/time_entries.feature index b1191db9fd..c4b176a9f1 100644 --- a/features/issues/time_entries.feature +++ b/features/issues/time_entries.feature @@ -57,12 +57,14 @@ Feature: Tracking Time @javascript Scenario: Adding a time entry + Given the plugin openproject_costs is not loaded When I log 2 hours with the comment "test" Then I should see a time entry with 2 hours and comment "test" And I should see a total spent time of 6 hours @javascript @selenium Scenario: Editing a time entry + Given the plugin openproject_costs is not loaded When I update the first time entry with 4 hours and the comment "updated test" Then I should see a time entry with 4 hours and comment "updated test" And I should see a total spent time of 4 hours @@ -72,7 +74,6 @@ Feature: Tracking Time When I go to the time entry page of issue "issue1" And I select "yesterday" from "period" Then I should not see a total spent time of 0 hours - When I click "Apply" Then I should see a total spent time of 0 hours diff --git a/features/step_definitions/general_steps.rb b/features/step_definitions/general_steps.rb index df269c4c8f..87217089d3 100644 --- a/features/step_definitions/general_steps.rb +++ b/features/step_definitions/general_steps.rb @@ -101,7 +101,16 @@ end Given /^the plugin (.+) is loaded$/ do |plugin_name| plugin_name = plugin_name.gsub("\"", '') - Redmine::Plugin.all.detect { |x| x.id == plugin_name.to_sym }.present? ? nil : pending("Plugin #{plugin_name} not loaded") + Redmine::Plugin.all.detect { |x| + x.id == plugin_name.to_sym + }.present? ? nil : pending("Plugin #{plugin_name} not loaded") +end + +Given /^the plugin (.+) is not loaded$/ do |plugin_name| + plugin_name = plugin_name.gsub("\"", '') + Redmine::Plugin.all.detect { |x| + x.id == plugin_name.to_sym + }.present? ? pending("Plugin #{plugin_name} not loaded") : nil end Given /^(?:the )?[pP]roject "([^\"]*)" uses the following [mM]odules:$/ do |project, table|