Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Fixes OptionsListUtils test expectations and adds comments #18600

Merged
merged 2 commits into from
May 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/unit/OptionsListUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,9 @@ describe('OptionsListUtils', () => {
// When we pass an empty search value
let results = OptionsListUtils.getShareDestinationOptions(REPORTS, PERSONAL_DETAILS, [], '');

// Then we should expect 10 recent reports to show because we're grabbing DM chats and group chats
expect(results.recentReports.length).toBe(10);
// Then we should expect 5 recent reports to show because we're grabbing DM chats and group chats
// because we've limited the number of recent reports to 5
expect(results.recentReports.length).toBe(5);

// When we pass a search value that doesn't match the group chat name
results = OptionsListUtils.getShareDestinationOptions(REPORTS, PERSONAL_DETAILS, [], 'mutants');
Expand All @@ -650,7 +651,8 @@ describe('OptionsListUtils', () => {
results = OptionsListUtils.getShareDestinationOptions(REPORTS_WITH_WORKSPACE_ROOMS, PERSONAL_DETAILS, [], '');

// Then we should expect the DMS, the group chats and the workspace room to show
expect(results.recentReports.length).toBe(11);
// We should expect 5 recent reports to show because we're grabbing DM chats and group chats
expect(results.recentReports.length).toBe(5);

// When we search for a workspace room
results = OptionsListUtils.getShareDestinationOptions(REPORTS_WITH_WORKSPACE_ROOMS, PERSONAL_DETAILS, [], 'Avengers Room');
Expand Down