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
b588b6a3
Commit
b588b6a3
authored
Jan 25, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
5ec8e800
c73bf13d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
2 deletions
+28
-2
qa/qa/page/base.rb
qa/qa/page/base.rb
+4
-0
qa/qa/page/project/branches/show.rb
qa/qa/page/project/branches/show.rb
+3
-1
qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
...r_ui/3_create/repository/add_list_delete_branches_spec.rb
+1
-0
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+11
-0
qa/spec/page/logging_spec.rb
qa/spec/page/logging_spec.rb
+9
-1
No files found.
qa/qa/page/base.rb
View file @
b588b6a3
...
...
@@ -128,6 +128,10 @@ module QA
page
.
has_no_text?
text
end
def
finished_loading?
has_no_css?
(
'.fa-spinner'
,
wait:
Capybara
.
default_max_wait_time
)
end
def
within_element
(
name
)
page
.
within
(
element_selector_css
(
name
))
do
yield
...
...
qa/qa/page/project/branches/show.rb
View file @
b588b6a3
...
...
@@ -19,10 +19,12 @@ module QA
within_element
(
:all_branches
)
do
within
(
".js-branch-
#{
branch_name
}
"
)
do
accept_alert
do
find_element
(
:remove_btn
).
click
click_element
(
:remove_btn
)
end
end
end
finished_loading?
end
def
has_branch_title?
(
branch_title
)
...
...
qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
View file @
b588b6a3
...
...
@@ -28,6 +28,7 @@ module QA
Git
::
Repository
.
perform
do
|
repository
|
repository
.
uri
=
project
.
repository_http_location
.
uri
repository
.
use_default_credentials
repository
.
try_add_credentials_to_netrc
repository
.
act
do
clone
...
...
qa/qa/support/page/logging.rb
View file @
b588b6a3
...
...
@@ -112,6 +112,17 @@ module QA
found
end
def
finished_loading?
log
(
'waiting for loading to complete...'
)
now
=
Time
.
now
loaded
=
super
log
(
"loading complete after
#{
Time
.
now
-
now
}
seconds"
)
loaded
end
def
within_element
(
name
)
log
(
"within element :
#{
name
}
"
)
...
...
qa/spec/page/logging_spec.rb
View file @
b588b6a3
# frozen_string_literal: true
require
'capybara/dsl'
require
'logger'
describe
QA
::
Support
::
Page
::
Logging
do
include
Support
::
StubENV
...
...
@@ -8,7 +9,7 @@ describe QA::Support::Page::Logging do
let
(
:page
)
{
double
().
as_null_object
}
before
do
logger
=
Logger
.
new
$stdout
logger
=
::
Logger
.
new
$stdout
logger
.
level
=
::
Logger
::
DEBUG
QA
::
Runtime
::
Logger
.
logger
=
logger
...
...
@@ -95,6 +96,13 @@ describe QA::Support::Page::Logging do
.
to
output
(
/has_no_text\?\('foo'\) returned true/
).
to_stdout_from_any_process
end
it
'logs finished_loading?'
do
expect
{
subject
.
finished_loading?
}
.
to
output
(
/waiting for loading to complete\.\.\./
).
to_stdout_from_any_process
expect
{
subject
.
finished_loading?
}
.
to
output
(
/loading complete after .* seconds$/
).
to_stdout_from_any_process
end
it
'logs within_element'
do
expect
{
subject
.
within_element
(
:element
)
}
.
to
output
(
/within element :element/
).
to_stdout_from_any_process
...
...
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