From daa5010cbb0d0c2968f24097dbcf87e6533dce4c Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 12 Nov 2023 21:41:12 +0000 Subject: [PATCH] Add system test for #39521. git-svn-id: https://svn.redmine.org/redmine/trunk@22428 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/system/inline_autocomplete_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb index 25d86fd6b..d7743012f 100644 --- a/test/system/inline_autocomplete_test.rb +++ b/test/system/inline_autocomplete_test.rb @@ -217,4 +217,23 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase assert_equal '@dlopper ', find('#notes').value end + + def test_inline_autocomplete_for_users_on_issues_without_edit_issue_permission + role_developer = Role.find(2) + role_developer.remove_permission!(:edit_issues) + role_developer.add_permission!(:add_issue_watchers) + + log_user('jsmith', 'jsmith') + visit '/issues/4/edit' + + find('#issue_notes').click + fill_in 'issue[notes]', :with => '@' + + within('.tribute-container') do + assert page.has_text? 'John Smith' + first('li').click + end + + assert_equal '@jsmith ', find('#issue_notes').value + end end