2019-09-13 13:26:31 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module QA
|
2022-10-21 21:10:20 +00:00
|
|
|
RSpec.describe 'Plan', :smoke, product_group: :project_management do
|
2019-09-13 13:26:31 +00:00
|
|
|
describe 'mention' do
|
2020-07-22 06:09:44 +00:00
|
|
|
let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
|
|
|
|
let(:project) do
|
|
|
|
Resource::Project.fabricate_via_api! do |project|
|
2020-02-06 03:08:47 +00:00
|
|
|
project.name = 'project-to-test-mention'
|
|
|
|
project.visibility = 'private'
|
2019-09-13 13:26:31 +00:00
|
|
|
end
|
2020-07-22 06:09:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
before do
|
|
|
|
Flow::Login.sign_in
|
2019-09-13 13:26:31 +00:00
|
|
|
|
2020-07-22 06:09:44 +00:00
|
|
|
project.add_member(user)
|
2019-09-13 13:26:31 +00:00
|
|
|
|
2020-01-09 18:07:52 +00:00
|
|
|
Resource::Issue.fabricate_via_api! do |issue|
|
2019-09-13 13:26:31 +00:00
|
|
|
issue.project = project
|
2020-01-09 18:07:52 +00:00
|
|
|
end.visit!
|
2019-09-13 13:26:31 +00:00
|
|
|
end
|
|
|
|
|
2021-12-13 21:14:32 +00:00
|
|
|
it 'mentions another user in an issue', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347988' do
|
2019-09-13 13:26:31 +00:00
|
|
|
Page::Project::Issue::Show.perform do |show|
|
2020-07-22 06:09:44 +00:00
|
|
|
at_username = "@#{user.username}"
|
2019-09-13 13:26:31 +00:00
|
|
|
|
|
|
|
show.select_all_activities_filter
|
|
|
|
show.comment(at_username)
|
|
|
|
|
|
|
|
expect(show).to have_link(at_username)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|