mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
replace/remove some cukes
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
#-- copyright
|
||||
# OpenProject is a project management system.
|
||||
# Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
|
||||
#
|
||||
# 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: Projects index feed
|
||||
Background:
|
||||
Given there is 1 project with the following:
|
||||
| identifier | omicronpersei8 |
|
||||
| name | omicronpersei8 |
|
||||
And there is a role "CanViewProject"
|
||||
And the role "CanViewProject" may have the following rights:
|
||||
| view_project |
|
||||
And there is 1 user with the following:
|
||||
| login | bob |
|
||||
And the user "bob" is a "CanViewProject" in the project "omicronpersei8"
|
||||
|
||||
Scenario: Basic columns visible
|
||||
Given I am already logged in as "bob"
|
||||
When I go to the projects page
|
||||
Then I should not see "Required disk storage" within "#project-table"
|
||||
And I should not see "Created on" within "#project-table"
|
||||
And I should not see "Latest activity at" within "#project-table"
|
||||
And I should see "Public" within "#project-table"
|
||||
And I should see "omicronpersei8" within "#project-table"
|
||||
|
||||
Scenario: Admin columns visible
|
||||
Given I am already admin
|
||||
When I go to the projects page
|
||||
Then I should see "Required disk storage" within "#project-table"
|
||||
And I should see "Created on" within "#project-table"
|
||||
And I should see "Latest activity at" within "#project-table"
|
||||
And I should see "Public" within "#project-table"
|
||||
And I should see "omicronpersei8" within "#project-table"
|
||||
@@ -1,71 +0,0 @@
|
||||
#-- copyright
|
||||
# OpenProject is a project management system.
|
||||
# Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
|
||||
#
|
||||
# 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: Attachments on work packages
|
||||
Background:
|
||||
Given there is 1 project with the following:
|
||||
| name | parent |
|
||||
| identifier | parent |
|
||||
And I am working in project "parent"
|
||||
And the project "parent" has the following types:
|
||||
| name | position |
|
||||
| Bug | 1 |
|
||||
And there is a default issuepriority with:
|
||||
| name | Normal |
|
||||
And there is a role "member"
|
||||
And the role "member" may have the following rights:
|
||||
| view_work_packages |
|
||||
| edit_work_packages |
|
||||
And there is 1 user with the following:
|
||||
| login | bob|
|
||||
And the user "bob" has the following preferences
|
||||
| warn_on_leaving_unsaved | false |
|
||||
And the user "bob" is a "member" in the project "parent"
|
||||
And there are the following issue status:
|
||||
| name | is_closed | is_default |
|
||||
| New | false | true |
|
||||
And the user "bob" has 1 issue with the following:
|
||||
| subject | work package 1 |
|
||||
| type | Bug |
|
||||
And the issue "work package 1" has an attachment "logo.gif"
|
||||
And I am already logged in as "bob"
|
||||
|
||||
|
||||
@javascript
|
||||
Scenario: A work package's attachment is listed
|
||||
When I go to the page for the issue "work package 1"
|
||||
Then I should see "work package 1"
|
||||
Then I should see "logo.gif" within ".work-package--attachments--files"
|
||||
|
||||
@javascript @wip
|
||||
Scenario: Deleting a work package's attachment is possible
|
||||
# Cannot click on an element which is not visible. Afaik this works with
|
||||
# capybara webkit driver.
|
||||
When I go to the page for the issue "work package 1"
|
||||
And I click the first delete attachment link
|
||||
Then I should not see "logo.gif" within ".work-package--attachments--files"
|
||||
@@ -1,64 +0,0 @@
|
||||
#-- copyright
|
||||
# OpenProject is a project management system.
|
||||
# Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
|
||||
#
|
||||
# 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: Having an inline diff view for work package description changes
|
||||
Background:
|
||||
Given there is 1 project with the following:
|
||||
| name | parent |
|
||||
| identifier | parent |
|
||||
And I am working in project "parent"
|
||||
And the project "parent" has the following types:
|
||||
| name | position |
|
||||
| Bug | 1 |
|
||||
And there is a default issuepriority with:
|
||||
| name | Normal |
|
||||
And there is a role "member"
|
||||
And the role "member" may have the following rights:
|
||||
| view_work_packages |
|
||||
And there is 1 user with the following:
|
||||
| login | bob |
|
||||
| firstname | Bob |
|
||||
| lastname | Bobbit |
|
||||
| admin | true |
|
||||
And the user "bob" is a "member" in the project "parent"
|
||||
Given the user "bob" has 1 issue with the following:
|
||||
| subject | wp1 |
|
||||
| description | Initial description |
|
||||
And I am already logged in as "bob"
|
||||
|
||||
@javascript @wip
|
||||
Scenario: A work package with a changed description links to the activity details
|
||||
# This fails on travis but is green locally; I guess due to database issues
|
||||
Given the work_package "wp1" is updated with the following:
|
||||
| description | Altered description |
|
||||
And journals are not being aggregated
|
||||
When I go to the page of the work package "wp1"
|
||||
Then I follow the link to see the diff in the last journal
|
||||
# Actually 'Initial' is being displayed as strikethrough text which
|
||||
# is hard to cover with plain text comparison
|
||||
And I should see "Altered Initial description"
|
||||
@@ -1,82 +0,0 @@
|
||||
#-- copyright
|
||||
# OpenProject is a project management system.
|
||||
# Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
|
||||
#
|
||||
# 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: Exporting work packages
|
||||
|
||||
Background:
|
||||
Given there is 1 user with the following:
|
||||
| login | bob |
|
||||
And there is a role "member"
|
||||
And the role "member" may have the following rights:
|
||||
| view_work_packages |
|
||||
And there is 1 project with the following:
|
||||
| name | project1 |
|
||||
| identifier | project1 |
|
||||
And the project "project1" has the following types:
|
||||
| name | position |
|
||||
| Bug | 1 |
|
||||
And the user "bob" is a "member" in the project "project1"
|
||||
And the user "bob" has 1 issue with the following:
|
||||
| subject | Some Issue |
|
||||
And I am already logged in as "bob"
|
||||
|
||||
@wip @javascript
|
||||
Scenario: No export links on project work packages index if user has no "export_work_packages" permission
|
||||
When I go to the work packages index page of the project called "project1"
|
||||
And I choose "Export" from the toolbar "settings" dropdown
|
||||
Then I should not see "CSV"
|
||||
And I should not see "PDF"
|
||||
|
||||
@wip @javascript
|
||||
Scenario: Export links on project issues work packages if user has the "export_work_packages" permission
|
||||
Given the role "member" may have the following rights:
|
||||
| export_work_packages |
|
||||
When I go to the work packages index page of the project called "project1"
|
||||
And I choose "Export" from the toolbar "settings" dropdown
|
||||
Then I should see "CSV" within ".other-formats"
|
||||
And I should see "PDF" within ".other-formats"
|
||||
|
||||
@wip @javascript
|
||||
Scenario: No export links on global issues index if user has no "export_work_packages" permission
|
||||
When I go to the global index page of work packages
|
||||
And I choose "Export" from the toolbar "settings" dropdown
|
||||
Then I should not see "CSV"
|
||||
And I should not see "PDF"
|
||||
|
||||
@wip @javascript
|
||||
Scenario: Export links on global issues index if user has the "export_work_packages" permission
|
||||
Given the role "member" may have the following rights:
|
||||
| export_work_packages |
|
||||
When I go to the global index page of work packages
|
||||
And I choose "Export" from the toolbar "settings" dropdown
|
||||
Then I should see "CSV" within ".other-formats"
|
||||
And I should see "PDF" within ".other-formats"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
#-- copyright
|
||||
# OpenProject is a project management system.
|
||||
# Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
|
||||
#
|
||||
# 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: Disabled done ratio on the work package index
|
||||
|
||||
Background:
|
||||
Given there is 1 project with the following:
|
||||
| identifier | project1 |
|
||||
| name | project1 |
|
||||
|
||||
And I am working in project "project1"
|
||||
|
||||
And the project "project1" has the following types:
|
||||
| name | position |
|
||||
| Bug | 1 |
|
||||
| Feature | 2 |
|
||||
|
||||
And there is a role "member"
|
||||
|
||||
And the role "member" may have the following rights:
|
||||
| view_work_packages |
|
||||
|
||||
And there is 1 user with the following:
|
||||
| login | bob |
|
||||
And there is 1 user with the following:
|
||||
| login | jimmy |
|
||||
|
||||
And the user "bob" is a "member" in the project "project1"
|
||||
And the user "jimmy" is a "member" in the project "project1"
|
||||
|
||||
And there are the following issues in project "project1":
|
||||
| subject | type | author | assignee |
|
||||
| issue1 | Bug | bob | jimmy |
|
||||
| issue2 | Feature | bob | jimmy |
|
||||
| issue3 | Bug | bob | jimmy |
|
||||
| issue4 | Feature | jimmy | bob |
|
||||
| issue5 | Bug | jimmy | bob |
|
||||
| issue6 | Feature | jimmy | bob |
|
||||
|
||||
And I am already logged in as "bob"
|
||||
|
||||
@javascript @wip
|
||||
Scenario: Groupings should be displayed when a grouping is selected
|
||||
When I go to the work packages index page of the project "project1"
|
||||
And I click "settingsDropdown"
|
||||
And I click "Group by …"
|
||||
And I select "Type" from the select2 dropdown
|
||||
Then I should see "(3)" within "#group-header-Bug .count"
|
||||
@@ -61,6 +61,7 @@ describe 'Projects index page',
|
||||
name: 'Development project',
|
||||
identifier: 'development-project')
|
||||
end
|
||||
let(:news) { FactoryGirl.create(:news, project: project) }
|
||||
|
||||
def load_and_open_filters(user)
|
||||
login_as(user)
|
||||
@@ -175,6 +176,12 @@ describe 'Projects index page',
|
||||
end
|
||||
|
||||
feature 'for admins' do
|
||||
before do
|
||||
project.update_attributes(created_on: 7.days.ago)
|
||||
|
||||
news
|
||||
end
|
||||
|
||||
scenario 'test that all projects are visible' do
|
||||
login_as(admin)
|
||||
visit projects_path
|
||||
@@ -193,6 +200,20 @@ describe 'Projects index page',
|
||||
expect(menu).to have_text('New subproject')
|
||||
expect(menu).to have_text('Delete')
|
||||
expect(menu).to have_text('Archive')
|
||||
|
||||
# Test visibility of admin only properties
|
||||
within('#project-table') do
|
||||
expect(page)
|
||||
.to have_selector('th', text: 'REQUIRED DISK STORAGE')
|
||||
expect(page)
|
||||
.to have_selector('th', text: 'CREATED ON')
|
||||
expect(page)
|
||||
.to have_selector('td', text: project.created_on.strftime('%m/%d/%Y'))
|
||||
expect(page)
|
||||
.to have_selector('th', text: 'LATEST ACTIVITY AT')
|
||||
expect(page)
|
||||
.to have_selector('td', text: news.created_on.strftime('%m/%d/%Y'))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -625,6 +646,10 @@ describe 'Projects index page',
|
||||
|
||||
# Remove public projects from the default list for these scenarios.
|
||||
public_project.update_attribute :status, Project::STATUS_ARCHIVED
|
||||
|
||||
project.update_attributes(created_on: 7.days.ago)
|
||||
|
||||
news
|
||||
end
|
||||
|
||||
scenario 'can see the "More" menu' do
|
||||
@@ -675,6 +700,20 @@ describe 'Projects index page',
|
||||
expect(menu).to_not have_text('Delete')
|
||||
expect(menu).to_not have_text('Archive')
|
||||
expect(menu).to_not have_text('Unrchive')
|
||||
|
||||
# Test admin only properties are invisible
|
||||
within('#project-table') do
|
||||
expect(page)
|
||||
.to have_no_selector('th', text: 'REQUIRED DISK STORAGE')
|
||||
expect(page)
|
||||
.to have_no_selector('th', text: 'CREATED ON')
|
||||
expect(page)
|
||||
.to have_no_selector('td', text: project.created_on.strftime('%m/%d/%Y'))
|
||||
expect(page)
|
||||
.to have_no_selector('th', text: 'LATEST ACTIVITY AT')
|
||||
expect(page)
|
||||
.to have_no_selector('td', text: news.created_on.strftime('%m/%d/%Y'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user