Don't access RemoteConfig directly from 'dumb' components

This commit is contained in:
Scott Nonnenberg 2022-10-24 13:46:36 -07:00 committed by GitHub
parent e79380b37c
commit 0134990275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 352 additions and 353 deletions

View file

@ -9,7 +9,6 @@ import { ContactCheckboxDisabledReason } from '../../../components/conversationL
import { getDefaultConversation } from '../../../test-both/helpers/getDefaultConversation';
import { LeftPaneChooseGroupMembersHelper } from '../../../components/leftPane/LeftPaneChooseGroupMembersHelper';
import { updateRemoteConfig } from '../../../test-both/helpers/RemoteConfigStub';
describe('LeftPaneChooseGroupMembersHelper', () => {
const defaults = {
@ -18,22 +17,13 @@ describe('LeftPaneChooseGroupMembersHelper', () => {
isShowingRecommendedGroupSizeModal: false,
isShowingMaximumGroupSizeModal: false,
isUsernamesEnabled: true,
groupSizeRecommendedLimit: 22,
groupSizeHardLimit: 33,
searchTerm: '',
regionCode: 'US',
selectedContacts: [],
};
beforeEach(async () => {
await updateRemoteConfig([
{ name: 'global.groupsv2.maxGroupSize', value: '22', enabled: true },
{
name: 'global.groupsv2.groupSizeHardLimit',
value: '33',
enabled: true,
},
]);
});
describe('getBackAction', () => {
it('returns the "show composer" action', () => {
const startComposing = sinon.fake();