Revert "Update relation chain after rebase"

This reverts commit 663508dec0.
because it broke the WCT tests on both validaton job and master job.

Failed test (from https://gerrit-ci.gerritforge.com/job/Gerrit-verifier-buck/1057/console)

chrome 55                ??? elements/change/gr-change-view/gr-change-view_test.html ?? gr-change-view tests ?? related changes are updated after rebase

  Cannot read property 'patchNum' of undefined
    <unknown> at               HTMLElement._reload at gr-change-view.js:852:0
    <unknown> at   HTMLElement._handleReloadChange at gr-change-view.js:716:0
    <unknown> at               Context.<anonymous> at gr-change-view_test.html:505:0

chrome 55                ??? elements/change/gr-change-view/gr-change-view_test.html ?? gr-change-view tests ?? related changes are updated after rebase

  Cannot read property 'patchNum' of undefined
    <unknown> at               HTMLElement._reload at gr-change-view.js:852:0
    <unknown> at   HTMLElement._handleReloadChange at gr-change-view.js:716:0
    <unknown> at               Context.<anonymous> at gr-change-view_test.html:505:0
    

Change-Id: I50378b7c97039207ce98b951a62afaae6ae3196f
This commit is contained in:
Luca Milanesio
2017-01-12 09:12:54 +00:00
parent 261ffcf84c
commit e19ab28dc0
3 changed files with 3 additions and 27 deletions

View File

@@ -717,13 +717,8 @@
}.bind(this));
},
_handleReloadChange: function(e) {
return this._reload().then(function() {
// If the change was rebased, we need to reload the related changes.
if (e.detail.action === 'rebase') {
this.$.relatedChanges.reload();
}
}.bind(this));
_handleReloadChange: function() {
this._reload();
},
_handleGetChangeDetailError: function(response) {

View File

@@ -499,24 +499,6 @@ limitations under the License.
assert.isTrue(reloadStub.calledTwice);
});
test('related changes are updated after rebase', function(done) {
sandbox.stub(element.$.relatedChanges, 'reload');
var e = {detail: {action: 'rebase'}};
element._handleReloadChange(e).then(function() {
assert.isTrue(element.$.relatedChanges.reload.called);
done();
});
});
test('related changes are not updated after other action', function(done) {
sandbox.stub(element.$.relatedChanges, 'reload');
var e = {detail: {action: 'abandon'}};
element._handleReloadChange(e).then(function() {
assert.isFalse(element.$.relatedChanges.reload.called);
done();
});
});
test('change status new', function() {
element._changeNum = '1';
element._patchRange = {