Commit e45d8cd9 authored by Alfredo Sumaran's avatar Alfredo Sumaran

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
parents 7a8f2b50 3a307671
......@@ -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);
}
......
---
title: Fix Merge request pipelines displays JSON
merge_request:
author:
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment