OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
replace cuke with spec
ulferts9ddf75848c2a
diff --git a/modules/backlogs/features/backlog_settings.feature b/modules/backlogs/features/backlog_settings.featuredeleted file mode 100644index 77d1ec6e8b7..00000000000--- a/modules/backlogs/features/backlog_settings.feature+++ /dev/null@@ -1,70 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2020 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2017 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See docs/COPYRIGHT.rdoc for more details.-#++--Feature: Backlog Settings- As a Project Admin- I want to configure the backlogs plugin- So that my team and I can work effectively-- Background:- Given there is 1 project with:- | name | ecookbook |- And I am working in project "ecookbook"- And the project uses the following modules:- | backlogs |- And the backlogs module is initialized- And there is 1 user with:- | login | padme |- And there is a role "project admin"- And the role "project admin" may have the following rights:- | edit_project |- | manage_project_activities |- And the user "padme" is a "project admin"- And there are the following issue status:- | name | is_closed | is_default |- | New | false | true |- | In Progress | false | false |- | Resolved | false | false |- | Closed | true | false |- | Rejected | true | false |- And I am already logged in as "padme"-- @javascript- Scenario: One can select which status indicate that a work_package is done- Given there is 1 project with:- | name | parent |- And I am working in project "parent"- And the project uses the following modules:- | backlogs |- And I am working in project "ecookbook"- When I go to the settings/backlogs page of the project called "ecookbook"- Then there should be a "Resolved" field- When I check "Resolved"- And I press "Save"- When I go to the settings/backlogs page of the project called "ecookbook"- Then the "Resolved" checkbox should be checkeddiff --git a/modules/backlogs/spec/features/resolved_status.rb b/modules/backlogs/spec/features/resolved_status.rbnew file mode 100644index 00000000000..ab19e6b8f21--- /dev/null+++ b/modules/backlogs/spec/features/resolved_status.rb@@ -0,0 +1,65 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2020 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2017 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'spec_helper'++describe 'Resolved status',+ type: :feature do+ let!(:project) do+ FactoryBot.create(:project,+ enabled_module_names: %w(backlogs))+ end+ let!(:status) { FactoryBot.create(:status, is_default: true) }+ let(:role) do+ FactoryBot.create(:role,+ permissions: %i(edit_project))++ end+ let!(:current_user) do+ FactoryBot.create(:user,+ member_in_project: project,+ member_through_role: role)+ end+ let(:settings_page) { Pages::Projects::Settings.new(project) }++ before do+ login_as current_user+ end++ it 'allows setting a status as done although it is not closed' do+ settings_page.visit_tab! 'backlogs'++ check status.name+ click_button 'Save'++ settings_page.expect_notification(message: 'Successful update')++ expect(page)+ .to have_checked_field(status.name)+ end+enddiff --git a/spec/support/pages/projects/settings.rb b/spec/support/pages/projects/settings.rbindex 2f4e8ce3222..a811e506124 100644--- a/spec/support/pages/projects/settings.rb+++ b/spec/support/pages/projects/settings.rb@@ -88,6 +88,10 @@ module Pagesprivate+ def notification_type+ :rails+ end+def pathsettings_generic_project_path(project)end