Merge pull request #3743 from opf/cost-plugin-dependencies

Exclude time entry cukes when cost plugin is loaded
pull/3721/merge
Stefan Botzenhart 9 years ago
commit 61dc1fa3bc
  1. 10
      app/views/time_entries/reports/show.html.erb
  2. 3
      features/issues/time_entries.feature
  3. 11
      features/step_definitions/general_steps.rb

@ -60,10 +60,14 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="form--field">
<%= 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]}),
<% 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: nil,
disabled: (@criterias.length >= 3), id: "criterias") %>
id: "criterias",
disabled: (@criterias.length >= 3)) %>
</div>
</div>
<div class="grid-block">

@ -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

@ -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|

Loading…
Cancel
Save