mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Assume everyone is GV2-capable
This commit is contained in:
@@ -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,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user