mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Merge pull request #3743 from opf/cost-plugin-dependencies
Exclude time entry cukes when cost plugin is loaded
This commit is contained in:
@@ -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]}),
|
||||
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)) %>
|
||||
</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|
|
||||
|
||||
Reference in New Issue
Block a user