Merge "Merge branch 'stable-3.0'"
This commit is contained in:
@@ -349,6 +349,13 @@ limitations under the License.
|
||||
return this._navigate(this.getUrlForSearchQuery(query, opt_offset));
|
||||
},
|
||||
|
||||
/**
|
||||
* Navigate to the user's dashboard
|
||||
*/
|
||||
navigateToUserDashboard() {
|
||||
return this._navigate(this.getUrlForUserDashboard('self'));
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {!Object} change The change object.
|
||||
* @param {number=} opt_patchNum
|
||||
|
||||
@@ -1424,9 +1424,13 @@
|
||||
},
|
||||
|
||||
_handleSettingsLegacyRoute(data) {
|
||||
// email tokens may contain '+' but no space.
|
||||
// The parameter parsing replaces all '+' with a space,
|
||||
// undo that to have valid tokens.
|
||||
const token = data.params[0].replace(/ /g, '+');
|
||||
this._setParams({
|
||||
view: Gerrit.Nav.View.SETTINGS,
|
||||
emailToken: data.params[0],
|
||||
emailToken: token,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -672,6 +672,14 @@ limitations under the License.
|
||||
});
|
||||
});
|
||||
|
||||
test('_handleSettingsLegacyRoute with +', () => {
|
||||
const data = {params: {0: 'my-token test'}};
|
||||
assertDataToParams(data, '_handleSettingsLegacyRoute', {
|
||||
view: Gerrit.Nav.View.SETTINGS,
|
||||
emailToken: 'my-token+test',
|
||||
});
|
||||
});
|
||||
|
||||
test('_handleSettingsRoute', () => {
|
||||
const data = {};
|
||||
assertDataToParams(data, '_handleSettingsRoute', {
|
||||
|
||||
Reference in New Issue
Block a user