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
95bbe9e5
Commit
95bbe9e5
authored
Aug 19, 2020
by
Sanad Liaquat (Personal)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace click_body with native mouse events
parent
54c2546c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
app/views/projects/settings/_archive.html.haml
app/views/projects/settings/_archive.html.haml
+1
-1
qa/qa/page/base.rb
qa/qa/page/base.rb
+9
-4
qa/qa/page/project/settings/advanced.rb
qa/qa/page/project/settings/advanced.rb
+2
-1
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+6
-0
No files found.
app/views/projects/settings/_archive.html.haml
View file @
95bbe9e5
-
return
unless
can?
(
current_user
,
:archive_project
,
@project
)
.sub-section
.sub-section
{
data:
{
qa_selector:
'archive_project_content'
}
}
%h4
.warning-title
-
if
@project
.
archived?
=
_
(
'Unarchive project'
)
...
...
qa/qa/page/base.rb
View file @
95bbe9e5
...
...
@@ -44,10 +44,6 @@ module QA
wait_for_requests
end
def
click_body
page
.
find
(
"body"
).
click
end
def
wait_until
(
max_duration:
60
,
sleep_interval:
0.1
,
reload:
true
,
raise_on_failure:
true
)
Support
::
Waiter
.
wait_until
(
max_duration:
max_duration
,
sleep_interval:
sleep_interval
,
raise_on_failure:
raise_on_failure
)
do
yield
||
(
reload
&&
refresh
&&
false
)
...
...
@@ -145,6 +141,15 @@ module QA
end
end
# Use this to simulate moving the pointer to an element's coordinate
# and sending a click event.
# This is a helpful workaround when there is a transparent element overlapping
# the target element and so, normal `click_element` on target would raise
# Selenium::WebDriver::Error::ElementClickInterceptedError
def
click_element_coordinates
(
name
)
page
.
driver
.
browser
.
action
.
move_to
(
find_element
(
name
).
native
).
click
.
perform
end
# replace with (..., page = self.class)
def
click_element
(
name
,
page
=
nil
,
**
kwargs
)
wait_for_requests
...
...
qa/qa/page/project/settings/advanced.rb
View file @
95bbe9e5
...
...
@@ -17,6 +17,7 @@ module QA
view
'app/views/projects/settings/_archive.html.haml'
do
element
:archive_project_link
element
:unarchive_project_link
element
:archive_project_content
end
view
'app/views/projects/_export.html.haml'
do
...
...
@@ -45,7 +46,7 @@ module QA
# Retry added here due to seldom seen inconsistent UI state issue:
# https://gitlab.com/gitlab-org/gitlab/-/issues/231242
retry_on_exception
do
click_
body
click_
element_coordinates
(
:archive_project_content
)
expand_select_list
# Workaround for a failure to search when there are no spaces around the /
# https://gitlab.com/gitlab-org/gitlab/-/issues/218965
...
...
qa/qa/support/page/logging.rb
View file @
95bbe9e5
...
...
@@ -64,6 +64,12 @@ module QA
super
end
def
click_element_coordinates
(
name
)
log
(
%Q(clicking the coordinates of :
#{
name
}
)
)
super
end
def
click_element
(
name
,
page
=
nil
,
**
kwargs
)
msg
=
[
"clicking :
#{
name
}
"
]
msg
<<
", expecting to be at
#{
page
.
class
}
"
if
page
...
...
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