Closed marcaaron closed 2 months ago
love it - once https://github.com/Expensify/App/pull/39757 is merged will you make this external then?
Gonna give first licks to @s77rt since they have a ton of context at this point. But if they don't want to work on it we can make it External
.
To not block on this let's make it external for now (I will be C+ if C+ is needed here). I will pick this up if no one took it (once I get more work done)
Verify that the routes for Group participants invites, participant details, and role selection works as expected. Test corner cases like deep link, etc.
Does this mean manual verification or via tests only?
Verify that the performance of the options list in InviteReportParticipantsPage is adequate.
Same question for this.
Add tests for getGroupChatName() to verify that it is working correctly.
New tests.
Add UI and unit tests.
Some examples of UI tests:
shouldApplyLimit
is false.
-- If 2, then it should show 2 names if shouldApplyLimit
is true (limit will be applied).
-- If 8, then it should show 5 names if shouldApplyLimit
is true (limit will be applied).We can also have a test to check the alternateText
.
shouldApplyLimit
is false.
-- If 2, then it should show 2 names if shouldApplyLimit
is true (limit will be applied).
-- If 8, then it should show 5 names if shouldApplyLimit
is true (limit will be applied).Unit tests:
In these tests, we can also test for cases when participants's list has only one item. In this, long form of display name should show.
We can also test for case when formattedLogin
is used.
Example code for UI test:
describe('Group name', () => {
afterEach(() => {
jest.clearAllMocks();
Onyx.clear();
// Unsubscribe to pusher channels
PusherHelper.teardown();
});
it('Check if group name is showing correctly in LHN', () =>
signInAndGetApp("A, B, C, D")
.then(() => {
// Verify the sidebar links are rendered
const sidebarLinksHintText = Localize.translateLocal('sidebarScreen.listOfChats');
const sidebarLinks = screen.queryAllByLabelText(sidebarLinksHintText);
expect(sidebarLinks).toHaveLength(1);
// Verify there is only one option in the sidebar (Optional)
const optionRowsHintText = Localize.translateLocal('accessibilityHints.navigatesToChat');
const optionRows = screen.queryAllByAccessibilityHint(optionRowsHintText);
expect(optionRows).toHaveLength(1);
// Get the display name text
const displayNameHintText = Localize.translateLocal('accessibilityHints.chatUserDisplayNames');
const displayNameText = screen.queryByLabelText(displayNameHintText);
// A, B, C, D are the display names of the participants in the group chat
return waitFor(() => expect(displayNameText?.props?.children?.[0]).toBe("A, B, C, D"));
}));
});
Note that the names taken will be diff combinations, so that we can test the sorting logic as well.
Example code of unit tests:
describe('getGroupChatName tests', () => {
it('Should show all participants name if count <= 5 and shouldApplyLimit is false', async function () {
const report = {
...LHNTestUtils.getFakeReport([1, 2, 3, 4]),
chatType: CONST.REPORT.CHAT_TYPE.GROUP,
};
await Onyx.merge(ONYXKEYS.PERSONAL_DETAILS_LIST, participantsPersonalDetails);
expect(ReportUtils.getGroupChatName(report?.participantAccountIDs ?? [])).toEqual("(833) 240-3627, floki@vikings.net, Lagertha, Ragnar");
});
it('Should show 5 participants name if count > 5 and shouldApplyLimit is true', async function () {
const report = {
...LHNTestUtils.getFakeReport([1, 2, 3, 4, 5, 6, 7, 8]),
chatType: CONST.REPORT.CHAT_TYPE.GROUP,
};
await Onyx.merge(ONYXKEYS.PERSONAL_DETAILS_LIST, participantsPersonalDetails);
expect(ReportUtils.getGroupChatName(report?.participantAccountIDs ?? [], true)).toEqual("(833) 240-3627, floki@vikings.net, Lagertha, Lagertha, Ragnar");
});
});
Job added to Upwork: https://www.upwork.com/jobs/~012f0f59dd6db6b8bd
Current assignee @s77rt is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to @miljakljajic (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.
:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:
@ShridharGoel Thanks for the proposal. Overall this looks good to me 👍
🎀 👀 🎀 C+ reviewed Link to proposal
Current assignee @marcaaron is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @ShridharGoel 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
Thanks very much for your proposal @ShridharGoel 🙇
Does this mean manual verification or via tests only?
Manual verification is sufficient. As far as I can tell we don't have automated tests for complex navigation flows.
Rest of the proposal looks 💎
Thanks, link to the PR: https://github.com/Expensify/App/pull/40658
While testing, I found these bugs:
User can leave the group even if they are the only admin. This shouldn’t be allowed, either leave button shouldn’t show in this case, or we can ask the user about whom to make the admin when leave button is clicked.
Clicking on the leave button doesn’t show any confirmation dialog.
Thoughts on these bugs?
Should we create issues for these? I’ll like to work on these if possible.
Thanks @ShridharGoel, but they're not bugs.
This shouldn’t be allowed, either leave button shouldn’t show in this case, or we can ask the user about whom to make the admin when leave button is clicked.
This is allowed. An admin gets promoted automatically.
Clicking on the leave button doesn’t show any confirmation dialog.
Because there's nothing to confirm.
This issue has not been updated in over 15 days. @s77rt, @miljakljajic, @marcaaron, @ShridharGoel eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Bumped the PR
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.0-9 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-28. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
No regression test needed. We only adds tests.
@s77rt, @miljakljajic, @marcaaron, @ShridharGoel Whoops! This issue is 2 days overdue. Let's get this updated quick!
@s77rt paid - @ShridharGoel please accept the new offer, it seems there was an error with the original one.
Not overdue. Seems like we're almost done with this one.
@ShridharGoel bump
This was accepted few days back, thanks.
Paid and ready to close
cc @roryabraham coming from https://github.com/Expensify/App/pull/39757
Let's perform the following checks and add automated testing in this manner:
getGroupChatName()
appears correctly in the appropriate places (minimally the LHN and/or Report header)getGroupChatName()
works correctlyInviteReportParticipantsPage
is adequate. Apply debounce suggestion from here if necessary: https://github.com/Expensify/App/pull/39757/files#r1561332638Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @miljakljajic