Merge "Merge branch 'stable-3.0'"

This commit is contained in:
David Pursehouse
2019-09-02 06:06:58 +00:00
committed by Gerrit Code Review
60 changed files with 1039 additions and 504 deletions

View File

@@ -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

View File

@@ -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,
});
},

View File

@@ -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', {