Commit 02dc34ba authored by Sanad Liaquat's avatar Sanad Liaquat

Use admin access token

parent 6ba6cfd0
......@@ -73,6 +73,8 @@ module QA
end
def create_users_via_api(users)
create_admin_personal_access_token
users.each do |user|
Resource::User.fabricate_via_api! do |resource|
resource.username = user[:username]
......@@ -84,6 +86,13 @@ module QA
end
end
def create_admin_personal_access_token
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_admin_credentials)
Runtime::Env.personal_access_token = Resource::PersonalAccessToken.fabricate!.access_token
Page::Main::Menu.perform(&:sign_out)
end
def create_group_with_user_via_api(user: nil, group_name: nil)
Runtime::Env.ldap_username = user
Runtime::Env.ldap_password = 'password'
......
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