BigW Consortium Gitlab

Commit 886511fd by Phil Hughes Committed by Robert Speicher

Merge branch '38528-build-url' into 'master'

Fixes data parameter not being sent in ajax request for jobs log Closes #38528 See merge request gitlab-org/gitlab-ce!14564
parent 6d3bafcc
...@@ -166,7 +166,7 @@ window.Build = (function () { ...@@ -166,7 +166,7 @@ window.Build = (function () {
Build.prototype.getBuildTrace = function () { Build.prototype.getBuildTrace = function () {
return $.ajax({ return $.ajax({
url: `${this.pageUrl}/trace.json`, url: `${this.pageUrl}/trace.json`,
data: this.state, data: { state: this.state },
}) })
.done((log) => { .done((log) => {
gl.utils.setCiStatusFavicon(`${this.pageUrl}/status.json`); gl.utils.setCiStatusFavicon(`${this.pageUrl}/status.json`);
......
---
title: Fixes data parameter not being sent in ajax request for jobs log
merge_request:
author:
type: fixed
...@@ -289,4 +289,18 @@ describe('Build', () => { ...@@ -289,4 +289,18 @@ describe('Build', () => {
}); });
}); });
}); });
describe('getBuildTrace', () => {
it('should request build trace with state parameter', (done) => {
spyOn(jQuery, 'ajax').and.callThrough();
new Build();
setTimeout(() => {
expect(jQuery.ajax).toHaveBeenCalledWith(
{ url: `${BUILD_URL}/trace.json`, data: { state: '' } },
);
done();
}, 0);
});
});
}); });
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