Enable usernames
This commit is contained in:
parent
38da3d3152
commit
43de83f0de
26 changed files with 196 additions and 438 deletions
|
@ -8,7 +8,6 @@ import {
|
|||
getPinnedConversationIds,
|
||||
getPreferredLeftPaneWidth,
|
||||
getPreferredReactionEmoji,
|
||||
getUsernamesEnabled,
|
||||
} from '../../../state/selectors/items';
|
||||
import type { StateType } from '../../../state/reducer';
|
||||
import type { ItemsStateType } from '../../../state/ducks/items';
|
||||
|
@ -145,36 +144,4 @@ describe('both/state/selectors/items', () => {
|
|||
assert.deepStrictEqual(actual, preferredReactionEmoji);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getUsernamesEnabled', () => {
|
||||
it('returns false if the flag is missing or disabled', () => {
|
||||
[
|
||||
{},
|
||||
{ remoteConfig: {} },
|
||||
{
|
||||
remoteConfig: {
|
||||
'desktop.usernames': {
|
||||
name: 'desktop.usernames' as const,
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
].forEach(itemsState => {
|
||||
const state = getRootState(itemsState);
|
||||
assert.isFalse(getUsernamesEnabled(state));
|
||||
});
|
||||
});
|
||||
|
||||
it('returns true if the flag is enabled', () => {
|
||||
const state = getRootState({
|
||||
remoteConfig: {
|
||||
'desktop.usernames': {
|
||||
name: 'desktop.usernames' as const,
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
assert.isTrue(getUsernamesEnabled(state));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue