Assume everyone is GV2-capable

This commit is contained in:
Evan Hahn 2022-03-04 13:48:44 -06:00 committed by GitHub
parent 0a52318be6
commit effe5aae6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 16 additions and 405 deletions

View file

@ -14,7 +14,6 @@ import { updateRemoteConfig } from '../../../test-both/helpers/RemoteConfigStub'
describe('LeftPaneChooseGroupMembersHelper', () => {
const defaults = {
candidateContacts: [],
cantAddContactForModal: undefined,
isShowingRecommendedGroupSizeModal: false,
isShowingMaximumGroupSizeModal: false,
searchTerm: '',
@ -163,39 +162,5 @@ describe('LeftPaneChooseGroupMembersHelper', () => {
disabledReason: undefined,
});
});
it("disables contacts that aren't GV2-capable, unless they are already selected somehow", () => {
const candidateContacts = [
{ ...getDefaultConversation(), isGroupV2Capable: false },
{ ...getDefaultConversation(), isGroupV2Capable: undefined },
{ ...getDefaultConversation(), isGroupV2Capable: false },
];
const helper = new LeftPaneChooseGroupMembersHelper({
...defaults,
candidateContacts,
searchTerm: 'foo bar',
selectedContacts: [candidateContacts[2]],
});
assert.deepEqual(helper.getRow(1), {
type: RowType.ContactCheckbox,
contact: candidateContacts[0],
isChecked: false,
disabledReason: ContactCheckboxDisabledReason.NotCapable,
});
assert.deepEqual(helper.getRow(2), {
type: RowType.ContactCheckbox,
contact: candidateContacts[1],
isChecked: false,
disabledReason: ContactCheckboxDisabledReason.NotCapable,
});
assert.deepEqual(helper.getRow(3), {
type: RowType.ContactCheckbox,
contact: candidateContacts[2],
isChecked: true,
disabledReason: undefined,
});
});
});
});