Merge branch 'qa-ml-retry-first-login-validation' into 'master'
[CE] Retry the first login page validation Closes gitlab-org/quality/nightly#103 See merge request gitlab-org/gitlab-ce!29100
This commit is contained in:
commit
11bb3b53bc
1 changed files with 9 additions and 0 deletions
|
@ -10,9 +10,18 @@ module QA
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform_before_hooks
|
def perform_before_hooks
|
||||||
|
retries ||= 0
|
||||||
|
|
||||||
# The login page could take some time to load the first time it is visited.
|
# The login page could take some time to load the first time it is visited.
|
||||||
# We visit the login page and wait for it to properly load only once before the tests.
|
# We visit the login page and wait for it to properly load only once before the tests.
|
||||||
QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login)
|
QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login)
|
||||||
|
rescue QA::Page::Validatable::PageValidationError
|
||||||
|
if (retries += 1) < 3
|
||||||
|
Runtime::Logger.warn("The login page did not appear as expected. Retrying... (attempt ##{retries})")
|
||||||
|
retry
|
||||||
|
end
|
||||||
|
|
||||||
|
raise
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue