Neutral sample account names in tests, check scripts and the site's demo UI
The framework moves to 0e344ee.
This commit is contained in:
parent
83f8c363b4
commit
4c6817ecb5
42 changed files with 136 additions and 136 deletions
|
|
@ -52,15 +52,15 @@ test('an account seen natively survives normalization; forged or broken ones do
|
|||
const settings = normalizeProfiles({
|
||||
active: 'default',
|
||||
profiles: [
|
||||
{ id: 'default', name: 'Fishies', color: '#1d9bf0', account: { handle: 'playfishies', name: 'Fishies', avatar: 'https://pbs.twimg.com/profile_images/1/a_x96.jpg', signedIn: true } },
|
||||
{ id: 'default', name: 'Sample', color: '#1d9bf0', account: { handle: 'otheraccount', name: 'Sample', avatar: 'https://pbs.twimg.com/profile_images/1/a_x96.jpg', signedIn: true } },
|
||||
{ id: 'p1', name: 'x', color: '#f91880', account: { handle: 'bad handle!', name: 'x', signedIn: true } },
|
||||
{ id: 'p2', name: 'y', color: '#00ba7c', account: { handle: 'CRTkafa', name: 'CRT', avatar: 'https://evil.test/a.png', signedIn: false } },
|
||||
],
|
||||
});
|
||||
assert.equal(settings.profiles[0]!.account?.handle, 'playfishies');
|
||||
assert.equal(settings.profiles[0]!.account?.handle, 'otheraccount');
|
||||
assert.equal(settings.profiles[1]!.account, undefined);
|
||||
assert.equal(settings.profiles[2]!.account?.avatar, undefined);
|
||||
assert.deepEqual(accountLabel(settings.profiles[0]!), { title: 'Fishies', detail: '@playfishies', state: 'signed-in' });
|
||||
assert.deepEqual(accountLabel(settings.profiles[0]!), { title: 'Sample', detail: '@otheraccount', state: 'signed-in' });
|
||||
assert.deepEqual(accountLabel(settings.profiles[2]!), { title: 'CRT', detail: '@CRTkafa · signed out', state: 'signed-out' });
|
||||
assert.equal(accountLabel(settings.profiles[1]!).state, 'new');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue