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
6789befb
Commit
6789befb
authored
Nov 25, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes after review
Fix pipelines tests Fix rubocop
parent
cb9cee54
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
30 deletions
+6
-30
app/assets/javascripts/extensions/element.js.es6
app/assets/javascripts/extensions/element.js.es6
+3
-11
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+3
-19
No files found.
app/assets/javascripts/extensions/element.js.es6
View file @
6789befb
/* global Element */
/* eslint-disable consistent-return, max-len */
/* eslint-disable consistent-return, max-len
, no-empty, no-plusplus, func-names
*/
Element.prototype.closest = Element.prototype.closest || function closest(selector, selectedElement = this) {
if (!selectedElement) return;
return selectedElement.matches(selector) ? selectedElement : Element.prototype.closest(selector, selectedElement.parentElement);
};
/* eslint-disable */
/**
* .matches polyfill from mdn
* https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
*
* .matches is used in our code.
* In order to run the tests in Phantomjs we need this polyfill
*/
if (!Element.prototype.matches) {
Element.prototype.matches =
Element.prototype.matchesSelector ||
...
...
@@ -22,8 +14,8 @@ if (!Element.prototype.matches) {
Element.prototype.oMatchesSelector ||
Element.prototype.webkitMatchesSelector ||
function (s) {
var matches = (this.document || this.ownerDocument).querySelectorAll(s),
i = matches.length;
const matches = (this.document || this.ownerDocument).querySelectorAll(s);
let
i = matches.length;
while (--i >= 0 && matches.item(i) !== this) {}
return i > -1;
};
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
6789befb
...
...
@@ -25,16 +25,13 @@ describe "Pipelines", feature: true, js: true do
before
{
visit
namespace_project_pipeline_path
(
project
.
namespace
,
project
,
pipeline
)
}
it
'shows a list of builds'
do
it
'shows the pipeline graph'
do
expect
(
page
).
to
have_selector
(
'.pipeline-visualization'
)
expect
(
page
).
to
have_content
(
'Build'
)
expect
(
page
).
to
have_content
(
'Test'
)
expect
(
page
).
to
have_content
(
@success
.
id
)
expect
(
page
).
to
have_content
(
'Deploy'
)
expect
(
page
).
to
have_content
(
@failed
.
id
)
expect
(
page
).
to
have_content
(
@running
.
id
)
expect
(
page
).
to
have_content
(
@external
.
id
)
expect
(
page
).
to
have_content
(
'Retry failed'
)
expect
(
page
).
to
have_content
(
'Cancel running'
)
expect
(
page
).
to
have_link
(
'Play'
)
end
it
'shows Pipeline tab pane as active'
do
...
...
@@ -63,7 +60,6 @@ describe "Pipelines", feature: true, js: true do
before
{
click_on
'Retry failed'
}
it
{
expect
(
page
).
not_to
have_content
(
'Retry failed'
)
}
it
{
expect
(
page
).
to
have_selector
(
'.retried'
)
}
end
end
...
...
@@ -74,19 +70,8 @@ describe "Pipelines", feature: true, js: true do
before
{
click_on
'Cancel running'
}
it
{
expect
(
page
).
not_to
have_content
(
'Cancel running'
)
}
it
{
expect
(
page
).
to
have_selector
(
'.ci-canceled'
)
}
end
end
context
'playing manual build'
do
before
do
within
'.pipeline-holder'
do
click_link
(
'Play'
)
end
end
it
{
expect
(
@manual
.
reload
).
to
be_pending
}
end
end
describe
'GET /:project/pipelines/:id/builds'
do
...
...
@@ -166,5 +151,4 @@ describe "Pipelines", feature: true, js: true do
it
{
expect
(
@manual
.
reload
).
to
be_pending
}
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