Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fafa2969
Commit
fafa2969
authored
Jul 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
89fb45c0
2233e27b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
17 deletions
+30
-17
app/views/layouts/header/_current_user_dropdown.html.haml
app/views/layouts/header/_current_user_dropdown.html.haml
+1
-1
qa/qa/page/base.rb
qa/qa/page/base.rb
+3
-12
qa/qa/page/main/menu.rb
qa/qa/page/main/menu.rb
+2
-2
qa/qa/runtime/logger.rb
qa/qa/runtime/logger.rb
+1
-0
qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
...a/specs/features/browser_ui/1_manage/login/log_in_spec.rb
+4
-2
qa/qa/support/retrier.rb
qa/qa/support/retrier.rb
+19
-0
No files found.
app/views/layouts/header/_current_user_dropdown.html.haml
View file @
fafa2969
...
...
@@ -24,4 +24,4 @@
-
if
current_user_menu?
(
:sign_out
)
%li
.divider
%li
=
link_to
_
(
"Sign out"
),
destroy_user_session_path
,
class:
"sign-out-link"
=
link_to
_
(
"Sign out"
),
destroy_user_session_path
,
class:
"sign-out-link
qa-sign-out-link
"
qa/qa/page/base.rb
View file @
fafa2969
...
...
@@ -25,19 +25,10 @@ module QA
end
end
def
retry_until
(
max_attempts:
3
,
reload:
false
)
attempts
=
0
while
attempts
<
max_attempts
result
=
yield
return
result
if
result
refresh
if
reload
attempts
+=
1
def
retry_until
(
max_attempts:
3
,
reload:
false
,
sleep_interval:
0
)
QA
::
Support
::
Retrier
.
retry_until
(
max_attempts:
max_attempts
,
reload:
reload
,
sleep_interval:
sleep_interval
)
do
yield
end
false
end
def
retry_on_exception
(
max_attempts:
3
,
reload:
false
,
sleep_interval:
0.5
)
...
...
qa/qa/page/main/menu.rb
View file @
fafa2969
...
...
@@ -5,7 +5,7 @@ module QA
module
Main
class
Menu
<
Page
::
Base
view
'app/views/layouts/header/_current_user_dropdown.html.haml'
do
element
:
user_sign_out_link
,
'link_to _("Sign out")'
# rubocop:disable QA/ElementWithPattern
element
:
sign_out_link
element
:settings_link
,
'link_to s_("CurrentUser|Settings")'
# rubocop:disable QA/ElementWithPattern
end
...
...
@@ -53,7 +53,7 @@ module QA
def
sign_out
within_user_menu
do
click_
link
'Sign out'
click_
element
:sign_out_link
end
end
...
...
qa/qa/runtime/logger.rb
View file @
fafa2969
# frozen_string_literal: true
require
'logger'
require
'forwardable'
module
QA
module
Runtime
...
...
qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
View file @
fafa2969
...
...
@@ -11,8 +11,10 @@ module QA
expect
(
menu
).
to
have_personal_area
end
Page
::
Main
::
Menu
.
perform
do
|
menu
|
menu
.
sign_out
Support
::
Retrier
.
retry_until
(
reload:
false
,
sleep_interval:
0.5
)
do
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
Page
::
Main
::
Login
.
perform
(
&
:has_sign_in_tab?
)
end
Page
::
Main
::
Login
.
perform
do
|
form
|
...
...
qa/qa/support/retrier.rb
View file @
fafa2969
...
...
@@ -23,6 +23,25 @@ module QA
raise
end
end
def
retry_until
(
max_attempts:
3
,
reload:
false
,
sleep_interval:
0
)
QA
::
Runtime
::
Logger
.
debug
(
"with retry_until: max_attempts
#{
max_attempts
}
; sleep_interval
#{
sleep_interval
}
; reload:
#{
reload
}
"
)
attempts
=
0
while
attempts
<
max_attempts
QA
::
Runtime
::
Logger
.
debug
(
"Attempt number
#{
attempts
+
1
}
"
)
result
=
yield
return
result
if
result
sleep
sleep_interval
refresh
if
reload
attempts
+=
1
end
false
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment