From 8a32f47f1d34f2cc338648babb8a14bf564adba5 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Mon, 1 Oct 2018 08:51:41 +0200 Subject: [PATCH 1/4] Reduce toolbar height --- app/assets/stylesheets/layout/_toolbar.sass | 1 - .../components/wp-query-select/wp-query-selectable-title.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/stylesheets/layout/_toolbar.sass b/app/assets/stylesheets/layout/_toolbar.sass index 7126485d87..c9990eb1db 100644 --- a/app/assets/stylesheets/layout/_toolbar.sass +++ b/app/assets/stylesheets/layout/_toolbar.sass @@ -51,7 +51,6 @@ $nm-color-success-background: #d8fdd1 .toolbar-container padding: 0 margin-bottom: 12px - min-height: 50px > .subtitle font-size: rem-calc(14px) diff --git a/frontend/src/app/components/wp-query-select/wp-query-selectable-title.html b/frontend/src/app/components/wp-query-select/wp-query-selectable-title.html index 3769e179e9..714e5c76a9 100644 --- a/frontend/src/app/components/wp-query-select/wp-query-selectable-title.html +++ b/frontend/src/app/components/wp-query-select/wp-query-selectable-title.html @@ -25,5 +25,5 @@

{{ selectedTitle | slice:0:50 }} + class="wp-query-selectable-title--fixed"> {{ selectedTitle | slice:0:50 }}

From 01869f4df09b8d53396b621a174d783f15dd184b Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Fri, 14 Sep 2018 11:27:43 +0200 Subject: [PATCH 2/4] replace last core cuke --- features/projects/visibility.feature | 45 ------------------- .../projects/project_autocomplete_spec.rb | 36 ++++++++++++--- 2 files changed, 30 insertions(+), 51 deletions(-) delete mode 100644 features/projects/visibility.feature diff --git a/features/projects/visibility.feature b/features/projects/visibility.feature deleted file mode 100644 index 79b284fbbc..0000000000 --- a/features/projects/visibility.feature +++ /dev/null @@ -1,45 +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: Project Visibility - Background: - Given there is 1 project with the following: - | name | Bob's Accounting | - | identifier | bobs-accounting | - Then the project "Bob's Accounting" is public - - Scenario: A Project is visible on the landing page if it is set to public - Given I am on the login page - Then I should see "Select a project" within "#top-menu-items" - When I go to the overall Projects page - Then I should see "Bob's Accounting" within "#content" - - Scenario: Project is not visible on the landing page if it is not set to public - Given the project "Bob's Accounting" is not public - And I am on the login page - Then I should not see "Select a project" within "#top-menu-items" diff --git a/spec/features/projects/project_autocomplete_spec.rb b/spec/features/projects/project_autocomplete_spec.rb index 4293bfb21d..f3c5404262 100644 --- a/spec/features/projects/project_autocomplete_spec.rb +++ b/spec/features/projects/project_autocomplete_spec.rb @@ -30,7 +30,7 @@ require 'spec_helper' require 'features/projects/projects_page' describe 'Projects autocomplete page', type: :feature, js: true do - let!(:admin) { FactoryBot.create :admin } + let!(:user) { FactoryBot.create :user } let!(:project) do FactoryBot.create(:project, @@ -65,11 +65,26 @@ describe 'Projects autocomplete page', type: :feature, js: true do FactoryBot.create :project, name: name, identifier: identifier end end + let!(:non_member_project) do + FactoryBot.create :project + end + let!(:public_project) do + FactoryBot.create :public_project + end + # necessary to be able to see public projects + let!(:non_member_role) { FactoryBot.create :non_member } + # we only need the public permissions: view_project, :view_news + let(:role) { FactoryBot.create(:role, permissions: []) } + + include BecomeMember let(:top_menu) { ::Components::Projects::TopMenu.new } before do - login_as admin + ([project, project2, project3] + other_projects).each do |p| + add_user_to_project! user: user, project: p, role: role + end + login_as user visit root_path end @@ -77,6 +92,15 @@ describe 'Projects autocomplete page', type: :feature, js: true do top_menu.toggle top_menu.expect_open + # projects are displayed initially + within(top_menu.search_results) do + expect(page).to have_selector('.ui-menu-item-wrapper', text: project.name) + # public project is displayed as it is public + expect(page).to have_selector('.ui-menu-item-wrapper', text: public_project.name) + # only projects the user is member in are displayed + expect(page).to have_no_selector('.ui-menu-item-wrapper', text: non_member_project.name) + end + # Filter for projects top_menu.search ' Date: Mon, 1 Oct 2018 11:15:02 +0200 Subject: [PATCH 3/4] removing types cuke Has been properly replaced in the dev branch but backporting is more trouble than it is worth --- features/types/types.feature | 68 ------------------------------------ 1 file changed, 68 deletions(-) delete mode 100644 features/types/types.feature diff --git a/features/types/types.feature b/features/types/types.feature deleted file mode 100644 index 554ffc77c6..0000000000 --- a/features/types/types.feature +++ /dev/null @@ -1,68 +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: Types Settings - As a Project Admin - I want to configure which types are available in my project - So that I can adjust the global settings inherited by the type - So that my team and I can work effectively - - Background: - Given there are the following types: - | Name | is_default | - | Phase | true | - | Milestone | true | - | Something else | false | - - And there is a project named "ecookbook" - And I am working in project "ecookbook" - - 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_types | - And the user "padme" is a "project admin" - - And I am already logged in as "padme" - - Scenario: The project admin may see the currently enabled types - When I go to the "types" tab of the settings page of the project called "ecookbook" - Then the "Phase" checkbox should be checked - And the "Milestone" checkbox should be checked - And the "Something else" checkbox should not be checked - - Scenario: The project admin may set the currently enabled types - When I go to the "types" tab of the settings page of the project called "ecookbook" - And I check "Something else" - And I uncheck "Milestone" - And I press "Save" - Then the "Phase" checkbox should be checked - And the "Milestone" checkbox should not be checked - And the "Something else" checkbox should be checked From 6c90226db49b4446a0bc8fdfdd2d6e7b15d33f0c Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Tue, 2 Oct 2018 09:52:08 +0200 Subject: [PATCH 4/4] fix spec patterns for plugins --- lib/tasks/parallel_testing.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/parallel_testing.rake b/lib/tasks/parallel_testing.rake index 3847ac28ca..7f2c5778c9 100644 --- a/lib/tasks/parallel_testing.rake +++ b/lib/tasks/parallel_testing.rake @@ -114,7 +114,7 @@ namespace :parallel do desc 'Run plugin unit specs in parallel' task units: [:environment] do - pattern = "--pattern '^spec/(?!features\/)'" + pattern = "--pattern 'spec/(?!features\/)'" spec_folders = Plugins::LoadPathHelper.spec_load_paths.join(' ') @@ -127,7 +127,7 @@ namespace :parallel do desc 'Run plugin feature specs in parallel' task features: [:environment] do - pattern = "--pattern '^spec\/features\/'" + pattern = "--pattern 'spec\/features'" spec_folders = Plugins::LoadPathHelper.spec_load_paths.join(' ')