Merge branch '27932-merge-request-pipelines-displays-json' into 'master'
Adds `.json` to the endpoint requested in order to avoid showing JSON Closes #27932 See merge request !9105
This commit is contained in:
commit
e45d8cd97a
|
@ -8,7 +8,22 @@
|
|||
* Uses Vue.Resource
|
||||
*/
|
||||
class PipelinesService {
|
||||
constructor(endpoint) {
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fix Merge request pipelines displays JSON
|
||||
merge_request:
|
||||
author:
|
|
@ -1,6 +1,8 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Create New Merge Request', feature: true, js: true do
|
||||
include WaitForVueResource
|
||||
|
||||
let(:user) { create(:user) }
|
||||
let(:project) { create(:project, :public) }
|
||||
|
||||
|
@ -99,6 +101,7 @@ feature 'Create New Merge Request', feature: true, js: true do
|
|||
|
||||
page.within('.merge-request') do
|
||||
click_link 'Pipelines'
|
||||
wait_for_vue_resource
|
||||
|
||||
expect(page).to have_content "##{pipeline.id}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue