diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 21:08:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 21:08:47 +0000 |
commit | c8f773a8593926f4f2dec6f446a3b3e59e9c9909 (patch) | |
tree | 4e5ea1d3b861ff99015f6112da567de7873868aa /spec/features/projects/user_sees_user_popover_spec.rb | |
parent | 929b887e5391dea7cb53b88b77b9a35351c87d99 (diff) | |
download | gitlab-ce-c8f773a8593926f4f2dec6f446a3b3e59e9c9909.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/user_sees_user_popover_spec.rb')
-rw-r--r-- | spec/features/projects/user_sees_user_popover_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/features/projects/user_sees_user_popover_spec.rb b/spec/features/projects/user_sees_user_popover_spec.rb new file mode 100644 index 00000000000..adbf9073d59 --- /dev/null +++ b/spec/features/projects/user_sees_user_popover_spec.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'User sees user popover', :js do + set(:project) { create(:project, :repository) } + + let(:user) { project.creator } + let(:merge_request) do + create(:merge_request, source_project: project, target_project: project) + end + + before do + project.add_maintainer(user) + sign_in(user) + end + + subject { page } + + describe 'hovering over a user link in a merge request' do + before do + visit project_merge_request_path(project, merge_request) + end + + it 'displays user popover' do + popover_selector = '.user-popover' + + find('.js-user-link').hover + + expect(page).to have_css(popover_selector, visible: true) + + page.within(popover_selector) do + expect(page).to have_content(user.name) + end + end + end +end |