Assume everyone is GV2-capable
This commit is contained in:
parent
0a52318be6
commit
effe5aae6f
22 changed files with 16 additions and 405 deletions
|
@ -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,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue