Commit 6a18f0b8 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'file-locking-spec-fixes' into 'master'

Fix file locking spec and quarantine locks directory spec

See merge request gitlab-org/gitlab!19380
parents 0a4a4ba2 44e30d61
......@@ -29,7 +29,8 @@ module QA
end
end
it 'locks a directory and tries to push as a second user' do
# Bug issue: https://gitlab.com/gitlab-org/gitlab/issues/35254
it 'locks a directory and tries to push as a second user', :quarantine do
push branch: 'master', file: 'directory/file', as_user: @user_one
sign_out_and_sign_in_as user: @user_one
......@@ -74,7 +75,7 @@ module QA
click_lock
sign_out_and_sign_in_as user: @user_one
try_to_merge merge_request: merge_request
expect(page).to have_text("locked by Administrator")
expect(page).to have_text("locked by #{admin_username}")
end
it 'locks a file and unlocks in list' do
......@@ -150,6 +151,12 @@ module QA
def expect_no_error_on_push(for_file: 'file', as_user:)
expect { push branch: 'master', file: for_file, as_user: as_user }.not_to raise_error
end
def admin_username
Resource::User.fabricate_via_api! do |user|
user.username = Runtime::User.username
end.name
end
end
end
end
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