Merge "Add support for /groups"

This commit is contained in:
Ben Rohlfs
2019-06-27 08:53:38 +00:00
committed by Gerrit Code Review
2 changed files with 1 additions and 18 deletions

View File

@@ -277,8 +277,7 @@
if (!account) { return; }
this.$.restAPI.getPreferences().then(prefs => {
this._userLinks =
prefs.my.map(this._fixCustomMenuItem).filter(this._isSupportedLink);
this._userLinks = prefs.my.map(this._fixCustomMenuItem);
});
},
@@ -318,11 +317,6 @@
return linkObj;
},
_isSupportedLink(linkObj) {
// Groups are not yet supported.
return !linkObj.url.startsWith('/groups');
},
_generateSettingsLink() {
return this.getBaseUrl() + '/settings/';
},

View File

@@ -93,17 +93,6 @@ limitations under the License.
]);
});
test('filter unsupported urls', () => {
assert.deepEqual([
{url: '/c/331788/'},
{url: '/groups/self'},
{url: 'https://awesometown.com/#hashyhash'},
].filter(element._isSupportedLink), [
{url: '/c/331788/'},
{url: 'https://awesometown.com/#hashyhash'},
]);
});
test('user links', () => {
const defaultLinks = [{
title: 'Faves',