Rebase button should be always enabled.
Bug: Issue 3973 Change-Id: Ie70744d262925f2cc2face9d866b230a56a98537
This commit is contained in:
@@ -301,7 +301,14 @@
|
||||
|
||||
getChangeRevisionActions: function(changeNum, patchNum) {
|
||||
return this.fetchJSON(
|
||||
this.getChangeActionURL(changeNum, patchNum, '/actions'));
|
||||
this.getChangeActionURL(changeNum, patchNum, '/actions')).then(
|
||||
function(revisionActions) {
|
||||
// The rebase button on change screen is always enabled.
|
||||
if (revisionActions.rebase) {
|
||||
revisionActions.rebase.enabled = true;
|
||||
}
|
||||
return revisionActions;
|
||||
});
|
||||
},
|
||||
|
||||
getReviewedFiles: function(changeNum, patchNum) {
|
||||
|
||||
@@ -222,5 +222,20 @@ limitations under the License.
|
||||
element._specialFilePathCompare),
|
||||
['foo/bar.h', 'foo/bar.hpp', 'foo/bar.hxx']);
|
||||
});
|
||||
|
||||
test('rebase always enabled', function(done) {
|
||||
var resolveFetchJSON;
|
||||
var fetchJSONStub = sinon.stub(element, 'fetchJSON').returns(
|
||||
new Promise(function(resolve) {
|
||||
resolveFetchJSON = resolve;
|
||||
}));
|
||||
element.getChangeRevisionActions('42', '1337').then(
|
||||
function(response) {
|
||||
assert.isTrue(response.rebase.enabled);
|
||||
fetchJSONStub.restore();
|
||||
done();
|
||||
});
|
||||
resolveFetchJSON({rebase:{}});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user