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
e79cb1f4
Commit
e79cb1f4
authored
Jul 28, 2020
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix StaleElementReferenceError and ensure `add_member` success
parent
f3caeb39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
qa/qa/resource/members.rb
qa/qa/resource/members.rb
+5
-2
qa/qa/support/wait_for_requests.rb
qa/qa/support/wait_for_requests.rb
+4
-1
No files found.
qa/qa/resource/members.rb
View file @
e79cb1f4
...
@@ -8,9 +8,12 @@ module QA
...
@@ -8,9 +8,12 @@ module QA
#
#
module
Members
module
Members
def
add_member
(
user
,
access_level
=
AccessLevel
::
DEVELOPER
)
def
add_member
(
user
,
access_level
=
AccessLevel
::
DEVELOPER
)
QA
::
Runtime
::
Logger
.
debug
(
%Q[Adding user
#{
user
.
username
}
to
#{
full_path
}
#{
self
.
class
.
name
}
]
)
Support
::
Retrier
.
retry_until
do
QA
::
Runtime
::
Logger
.
debug
(
%Q[Adding user
#{
user
.
username
}
to
#{
full_path
}
#{
self
.
class
.
name
}
]
)
post
Runtime
::
API
::
Request
.
new
(
api_client
,
api_members_path
).
url
,
{
user_id:
user
.
id
,
access_level:
access_level
}
response
=
post
Runtime
::
API
::
Request
.
new
(
api_client
,
api_members_path
).
url
,
{
user_id:
user
.
id
,
access_level:
access_level
}
response
.
code
==
QA
::
Support
::
Api
::
HTTP_STATUS_CREATED
end
end
end
def
remove_member
(
user
)
def
remove_member
(
user
)
...
...
qa/qa/support/wait_for_requests.rb
View file @
e79cb1f4
...
@@ -27,7 +27,10 @@ module QA
...
@@ -27,7 +27,10 @@ module QA
# The number of selectors should be able to be reduced after
# The number of selectors should be able to be reduced after
# migration to the new spinner is complete.
# migration to the new spinner is complete.
# https://gitlab.com/groups/gitlab-org/-/epics/956
# https://gitlab.com/groups/gitlab-org/-/epics/956
Capybara
.
page
.
has_no_css?
(
'.gl-spinner, .fa-spinner, .spinner'
,
wait:
wait
)
# retry_on_exception added here due to `StaleElementReferenceError`. See: https://gitlab.com/gitlab-org/gitlab/-/issues/232485
Support
::
Retrier
.
retry_on_exception
do
Capybara
.
page
.
has_no_css?
(
'.gl-spinner, .fa-spinner, .spinner'
,
wait:
wait
)
end
end
end
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