diff options
Diffstat (limited to 'spec/features/issues/user_comments_on_issue_spec.rb')
-rw-r--r-- | spec/features/issues/user_comments_on_issue_spec.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/features/issues/user_comments_on_issue_spec.rb b/spec/features/issues/user_comments_on_issue_spec.rb index 004488f2f64..09d3ad15641 100644 --- a/spec/features/issues/user_comments_on_issue_spec.rb +++ b/spec/features/issues/user_comments_on_issue_spec.rb @@ -57,17 +57,9 @@ RSpec.describe "User comments on issue", :js do project.add_maintainer(user) create(:label, project: project, title: 'label') - page.within '.timeline-content-form' do - find('#note-body').native.send_keys('/l') - end - - wait_for_requests - - expect(page).to have_selector('.atwho-container') + fill_in 'Comment', with: '/l' - page.within '.atwho-container #at-view-commands' do - expect(find('li', match: :first)).to have_content('/label') - end + expect(find_highlighted_autocomplete_item).to have_content('/label') end end @@ -110,4 +102,10 @@ RSpec.describe "User comments on issue", :js do end end end + + private + + def find_highlighted_autocomplete_item + find('.atwho-view li.cur', visible: true) + end end |