Commit da8e8b96 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'egb-refactor-mentions_spec' into 'master'

Refactor mentions_spec to use `let` syntax

See merge request gitlab-org/gitlab!37262
parents 8214da07 209b10b9
......@@ -3,17 +3,18 @@
module QA
RSpec.describe 'Plan', :smoke, :reliable do
describe 'mention' do
before do
Flow::Login.sign_in
@user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
project = Resource::Project.fabricate_via_api! do |project|
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|
project.name = 'project-to-test-mention'
project.visibility = 'private'
end
end
before do
Flow::Login.sign_in
project.add_member(@user)
project.add_member(user)
Resource::Issue.fabricate_via_api! do |issue|
issue.project = project
......@@ -22,7 +23,7 @@ module QA
it 'mentions another user in an issue' do
Page::Project::Issue::Show.perform do |show|
at_username = "@#{@user.username}"
at_username = "@#{user.username}"
show.select_all_activities_filter
show.comment(at_username)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment