Use scenario disabler from within plugin

See https://github.com/finnlabs/openproject-costs/pull/184
pull/3793/head
Stefan Botzenhart 9 years ago
parent e8ae74fb17
commit 00be5f8e1e
  1. 2
      features/issues/time_entries.feature
  2. 14
      features/step_definitions/general_steps.rb

@ -57,14 +57,12 @@ 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

@ -99,20 +99,6 @@ Then /^the project "([^"]*)" is( not)? public$/ do |project_name, negation|
p.update_attribute(:is_public, !negation)
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")
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|
p = Project.find_by(name: project)

Loading…
Cancel
Save