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
adapt spec to read only mode
ulfertsf99600c07676
diff --git a/spec/features/work_packages/share_spec.rb b/spec/features/work_packages/share_spec.rbindex 35a81394525..78c561dd0e9 100644--- a/spec/features/work_packages/share_spec.rb+++ b/spec/features/work_packages/share_spec.rb@@ -32,7 +32,6 @@ require 'spec_helper'RSpec.describe 'Work package sharing',:js,- :with_cuprite,with_flag: { work_package_sharing: true } dolet(:sharer_role) docreate(:role,@@ -75,7 +74,6 @@ RSpec.describe 'Work package sharing',context 'when having share permission' do# TODO:# - Check email being sent- # - Check readding a user with a different role# - Check updating a user's roleit 'allows seeing and administrating sharing' dowork_package_page.visit!@@ -135,10 +133,10 @@ RSpec.describe 'Work package sharing',click_button 'Share'share_modal.expect_open- share_modal.expect_shared_with(view_user, 'View')- share_modal.expect_shared_with(comment_user, 'Comment')- share_modal.expect_shared_with(edit_user, 'Edit')- share_modal.expect_shared_with(shared_project_user, 'Edit')+ share_modal.expect_shared_with(view_user)+ share_modal.expect_shared_with(comment_user)+ share_modal.expect_shared_with(edit_user)+ share_modal.expect_shared_with(shared_project_user)share_modal.expect_not_shared_with(non_shared_project_user)share_modal.expect_not_shared_with(not_shared_yet_with_user)diff --git a/spec/support/components/work_packages/share_modal.rb b/spec/support/components/work_packages/share_modal.rbindex 171a691ecff..f9db9dfc94b 100644--- a/spec/support/components/work_packages/share_modal.rb+++ b/spec/support/components/work_packages/share_modal.rb@@ -70,15 +70,17 @@ module Componentsendend- def expect_shared_with(user, role_name)+ def expect_shared_with(user, role_name = nil)within active_list doexpect(page).to have_text(user.name)end- within user_row(user) do- expect(page)- .to have_button(role_name)+ if role_name+ within user_row(user) do+ expect(page)+ .to have_button(role_name)+ endendend