Commit 9b300c97 authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-fix-api-client-login-validation' into 'master'

[QA] Allow login validation before creating personal access token

See merge request gitlab-org/gitlab-ce!28960
parents 8ab0db4e 3f51df04
...@@ -25,15 +25,12 @@ module QA ...@@ -25,15 +25,12 @@ module QA
private private
def create_personal_access_token def create_personal_access_token
if @is_new_session Runtime::Browser.visit(@address, Page::Main::Login) if @is_new_session
Runtime::Browser.visit(@address, Page::Main::Login) { do_create_personal_access_token } do_create_personal_access_token
else
do_create_personal_access_token
end
end end
def do_create_personal_access_token def do_create_personal_access_token
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.perform(&:sign_in_using_credentials)
Resource::PersonalAccessToken.fabricate!.access_token Resource::PersonalAccessToken.fabricate!.access_token
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