Merge "Revert "Fix edit diff url"" into stable-3.0
This commit is contained in:
@@ -538,7 +538,8 @@
|
|||||||
|
|
||||||
_goToEditFile() {
|
_goToEditFile() {
|
||||||
// TODO(taoalpha): add a shortcut for editing
|
// 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);
|
return Gerrit.Nav.navigateToRelativeUrl(editUrl);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -378,7 +378,6 @@ limitations under the License.
|
|||||||
};
|
};
|
||||||
element._change = {
|
element._change = {
|
||||||
_number: 42,
|
_number: 42,
|
||||||
project: 'gerrit',
|
|
||||||
status: 'NEW',
|
status: 'NEW',
|
||||||
revisions: {
|
revisions: {
|
||||||
a: {_number: 1, commit: {parents: []}},
|
a: {_number: 1, commit: {parents: []}},
|
||||||
@@ -392,8 +391,6 @@ limitations under the License.
|
|||||||
assert.isTrue(!!editBtn);
|
assert.isTrue(!!editBtn);
|
||||||
MockInteractions.tap(editBtn);
|
MockInteractions.tap(editBtn);
|
||||||
assert.isTrue(redirectStub.called);
|
assert.isTrue(redirectStub.called);
|
||||||
assert.isTrue(redirectStub.lastCall.calledWithExactly(
|
|
||||||
Gerrit.Nav.getEditUrlForDiff(element._change, element._path)));
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user