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
Tatuya Kamada
gitlab-ce
Commits
86558d53
Commit
86558d53
authored
Feb 10, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds verification in case the endpoint already has `.json`
parent
4f265c3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
app/assets/javascripts/commit/pipelines/pipelines_service.js.es6
...ets/javascripts/commit/pipelines/pipelines_service.js.es6
+17
-2
spec/features/merge_requests/create_new_mr_spec.rb
spec/features/merge_requests/create_new_mr_spec.rb
+3
-0
No files found.
app/assets/javascripts/commit/pipelines/pipelines_service.js.es6
View file @
86558d53
...
@@ -8,8 +8,23 @@
...
@@ -8,8 +8,23 @@
* Uses Vue.Resource
* Uses Vue.Resource
*/
*/
class PipelinesService {
class PipelinesService {
constructor(endpoint) {
this.pipelines = Vue.resource(`${endpoint}.json`);
/**
* FIXME: The url provided to request the pipelines in the new merge request
* page already has `.json`.
* This should be fixed when the endpoint is improved.
*
* @param {String} root
*/
constructor(root) {
let endpoint;
if (root.indexOf('.json') === -1) {
endpoint = `${root}.json`;
} else {
endpoint = root;
}
this.pipelines = Vue.resource(endpoint);
}
}
/**
/**
...
...
spec/features/merge_requests/create_new_mr_spec.rb
View file @
86558d53
require
'spec_helper'
require
'spec_helper'
feature
'Create New Merge Request'
,
feature:
true
,
js:
true
do
feature
'Create New Merge Request'
,
feature:
true
,
js:
true
do
include
WaitForVueResource
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
@@ -99,6 +101,7 @@ feature 'Create New Merge Request', feature: true, js: true do
...
@@ -99,6 +101,7 @@ feature 'Create New Merge Request', feature: true, js: true do
page
.
within
(
'.merge-request'
)
do
page
.
within
(
'.merge-request'
)
do
click_link
'Pipelines'
click_link
'Pipelines'
wait_for_vue_resource
expect
(
page
).
to
have_content
"#
#{
pipeline
.
id
}
"
expect
(
page
).
to
have_content
"#
#{
pipeline
.
id
}
"
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