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
0bd72880
Commit
0bd72880
authored
Jan 08, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
4df75bd7
30d71ccf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
2 deletions
+58
-2
qa/qa/page/base.rb
qa/qa/page/base.rb
+8
-0
qa/qa/page/project/web_ide/edit.rb
qa/qa/page/project/web_ide/edit.rb
+20
-2
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+16
-0
qa/spec/page/logging_spec.rb
qa/spec/page/logging_spec.rb
+14
-0
No files found.
qa/qa/page/base.rb
View file @
0bd72880
...
...
@@ -116,6 +116,14 @@ module QA
has_css?
(
element_selector_css
(
name
),
wait:
wait
)
end
def
has_no_element?
(
name
,
wait:
Capybara
.
default_max_wait_time
)
has_no_css?
(
element_selector_css
(
name
),
wait:
wait
)
end
def
has_text?
(
text
)
page
.
has_text?
text
end
def
has_no_text?
(
text
)
page
.
has_no_text?
text
end
...
...
qa/qa/page/project/web_ide/edit.rb
View file @
0bd72880
...
...
@@ -66,11 +66,29 @@ module QA
def
commit_changes
click_element
:begin_commit_button
click_element
:commit_button
# After clicking :begin_commit_button there is an animation that
# hides :begin_commit_button and shows :commit_button
#
# Wait for the animation to complete before clicking :commit_button
# otherwise the click will quietly do nothing.
wait
(
reload:
false
)
do
page
.
has_content?
(
'Your changes have been committed'
)
has_no_element?
(
:begin_commit_button
)
&&
has_element?
(
:commit_button
)
end
# Retry the attempt to click :commit_button just in case part of the
# animation is still in process even when the buttons have the
# expected visibility.
commit_success_msg_shown
=
with_retry
do
click_element
:commit_button
wait
(
reload:
false
)
do
has_text?
(
'Your changes have been committed'
)
end
end
raise
"The changes do not appear to have been committed successfully."
unless
commit_success_msg_shown
end
end
end
...
...
qa/qa/support/page/logging.rb
View file @
0bd72880
...
...
@@ -88,6 +88,22 @@ module QA
found
end
def
has_no_element?
(
name
,
wait:
Capybara
.
default_max_wait_time
)
found
=
super
log
(
"has_no_element? :
#{
name
}
returned
#{
found
}
"
)
found
end
def
has_text?
(
text
)
found
=
super
log
(
%Q{has_text?('
#{
text
}
') returned
#{
found
}
}
)
found
end
def
has_no_text?
(
text
)
found
=
super
...
...
qa/spec/page/logging_spec.rb
View file @
0bd72880
...
...
@@ -74,6 +74,20 @@ describe QA::Support::Page::Logging do
.
to
output
(
/has_element\? :element returned true/
).
to_stdout_from_any_process
end
it
'logs has_no_element?'
do
allow
(
page
).
to
receive
(
:has_no_css?
).
and_return
(
true
)
expect
{
subject
.
has_no_element?
(
:element
)
}
.
to
output
(
/has_no_element\? :element returned true/
).
to_stdout_from_any_process
end
it
'logs has_text?'
do
allow
(
page
).
to
receive
(
:has_text?
).
and_return
(
true
)
expect
{
subject
.
has_text?
'foo'
}
.
to
output
(
/has_text\?\('foo'\) returned true/
).
to_stdout_from_any_process
end
it
'logs has_no_text?'
do
allow
(
page
).
to
receive
(
:has_no_text?
).
with
(
'foo'
).
and_return
(
true
)
...
...
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