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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
09a7a1f0
Commit
09a7a1f0
authored
Jan 25, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix intermittent click error
parent
6c978c8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
qa/qa/page/base.rb
qa/qa/page/base.rb
+9
-7
qa/qa/page/main/login.rb
qa/qa/page/main/login.rb
+4
-2
qa/qa/page/project/settings/common.rb
qa/qa/page/project/settings/common.rb
+6
-1
No files found.
qa/qa/page/base.rb
View file @
09a7a1f0
...
@@ -13,16 +13,18 @@ module QA
...
@@ -13,16 +13,18 @@ module QA
visit
current_url
visit
current_url
end
end
def
wait
(
css
=
'.application'
,
time:
60
)
def
wait
(
max:
60
,
time:
1
,
reload:
true
)
Time
.
now
.
tap
do
|
start
|
start
=
Time
.
now
while
Time
.
now
-
start
<
time
break
if
page
.
has_css?
(
css
,
wait:
5
)
refresh
while
Time
.
now
-
start
<
max
end
return
true
if
yield
sleep
(
time
)
refresh
if
reload
end
end
yield
if
block_given?
false
end
end
def
scroll_to
(
selector
,
text:
nil
)
def
scroll_to
(
selector
,
text:
nil
)
...
...
qa/qa/page/main/login.rb
View file @
09a7a1f0
...
@@ -10,12 +10,14 @@ module QA
...
@@ -10,12 +10,14 @@ module QA
view
'app/views/devise/sessions/_new_base.html.haml'
do
view
'app/views/devise/sessions/_new_base.html.haml'
do
element
:login_field
,
'text_field :login'
element
:login_field
,
'text_field :login'
element
:pass
ow
rd_field
,
'password_field :password'
element
:pass
wo
rd_field
,
'password_field :password'
element
:sign_in_button
,
'submit "Sign in"'
element
:sign_in_button
,
'submit "Sign in"'
end
end
def
initialize
def
initialize
wait
(
'.application'
,
time:
500
)
wait
(
max:
500
)
do
page
.
has_css?
(
'.application'
)
end
end
end
def
sign_in_using_credentials
def
sign_in_using_credentials
...
...
qa/qa/page/project/settings/common.rb
View file @
09a7a1f0
...
@@ -17,7 +17,12 @@ module QA
...
@@ -17,7 +17,12 @@ module QA
def
expand_section
(
name
)
def
expand_section
(
name
)
page
.
within
(
'#content-body'
)
do
page
.
within
(
'#content-body'
)
do
page
.
within
(
'section'
,
text:
name
)
do
page
.
within
(
'section'
,
text:
name
)
do
click_button
'Expand'
unless
first
(
'button'
,
text:
'Collapse'
)
# Because it is possible to click the button before the JS toggle code is bound
wait
(
reload:
false
)
do
click_button
'Expand'
unless
first
(
'button'
,
text:
'Collapse'
)
page
.
has_content?
(
'Collapse'
)
end
yield
if
block_given?
yield
if
block_given?
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