Commit 3f51df04 authored by Mark Lapierre's avatar Mark Lapierre

Allow login validation before block

Removes a block so that the login page is validated before the block,
while the login page is still present, instead of after it when the
login page is long gone
parent 8ab0db4e
...@@ -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