Revert "Fix edit diff url"

This reverts commit 59c52e00fa.

Reason for revert: This might have broken the edit from diff

Change-Id: Ibdd41d2f73191de97ec585ad1e65b830649557d8
This commit is contained in:
Tao Zhou
2020-05-18 15:40:08 +00:00
parent 59c52e00fa
commit bf05d23db8
2 changed files with 2 additions and 4 deletions

View File

@@ -538,7 +538,8 @@
_goToEditFile() {
// TODO(taoalpha): add a shortcut for editing
const editUrl = Gerrit.Nav.getEditUrlForDiff(this._change, this._path);
const editUrl = Gerrit.Nav.getEditUrlForDiff(
this._change, this._path, this._patchRange.patchNum);
return Gerrit.Nav.navigateToRelativeUrl(editUrl);
},

View File

@@ -378,7 +378,6 @@ limitations under the License.
};
element._change = {
_number: 42,
project: 'gerrit',
status: 'NEW',
revisions: {
a: {_number: 1, commit: {parents: []}},
@@ -392,8 +391,6 @@ limitations under the License.
assert.isTrue(!!editBtn);
MockInteractions.tap(editBtn);
assert.isTrue(redirectStub.called);
assert.isTrue(redirectStub.lastCall.calledWithExactly(
Gerrit.Nav.getEditUrlForDiff(element._change, element._path)));
done();
});
});