Skip to content

[HOLD for payment 2025-01-13] [$250] Implement tests for reports that should not be displayed in LHN #52034

Closed

Description

@OlimpiaZurek

Tracking issue: #52031.

Develop and implement tests to verify that the following report types are not displayed in the Left-Hand Navigation (LHN):

  1. Hidden report: Ensure reports marked as hidden do not appear in the LHN.
  2. Report with no participants: Validate that chats without participants are excluded from the LHN.
  3. Access restricted report: Confirm that reports the user cannot access due to policy restrictions are not shown.
  4. Single transaction thread: Ensure that reports containing only one transaction are excluded from the LHN.
  5. Empty chat: Verify that empty chats, when the excludeEmptyChats setting is true, are not displayed.
  6. Domain email exclusion: Check that reports are excluded when the user’s email is domain-based and the setting is false.
  7. Parent message pending removal: Confirm that reports with parent messages pending removal do not appear in the LHN.
  8. Focus Mode without unread messages: Ensure that when the user is in focus mode without unread messages, no reports are displayed.
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021862798689700375032
  • Upwork Job ID: 1862798689700375032
  • Last Price Increase: 2024-11-30
  • Automatic offers:
    • c3024 | Reviewer | 105210430
    • mkzie2 | Contributor | 105210431
Issue OwnerCurrent Issue Owner: @alexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 5, 2024
  2. melvin-bot commented on Nov 5, 2024

    @melvin-bot

    Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. changed the title [-]Implement tests for reports that should not be displayed in LHN[/-] [+][HOLD App#52036]Implement tests for reports that should not be displayed in LHN[/+] on Nov 5, 2024
  4. changed the title [-][HOLD App#52036]Implement tests for reports that should not be displayed in LHN[/-] [+][HOLD App#52036] Implement tests for reports that should not be displayed in LHN[/+] on Nov 5, 2024
  5. added
    PlanningChanges still in the thought process
    and removed on Nov 7, 2024
  6. alexpensify commented on Nov 7, 2024

    @alexpensify
    Contributor

    Moving to Weekly since we are on hold for App#52036


    Heads up, I will be offline until Tuesday, November 12, 2024, and will not actively watch over this GitHub during that period.

  7. alexpensify commented on Nov 19, 2024

    @alexpensify
    Contributor

    Still on hold for App#52036

  8. alexpensify commented on Nov 25, 2024

    @alexpensify
    Contributor

    On hold

  9. andriivitiv commented on Nov 25, 2024

    @andriivitiv
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Implement tests for reports that should not be displayed in LHN.

    What is the root cause of that problem?

    This is the first time we're adding these tests.

    What changes do you think we should make in order to solve the problem?

    Example of 1 test for reference:

    it('should not display hidden report', async () => {
        // When the SidebarLinks are rendered.
        await LHNTestUtils.getDefaultRenderedSidebarLinks();
        const report = createReport({isHidden: false});
    
        // And a non-hidden report is initialized in Onyx.
        await initializeState(false, {
            [`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
        });
    
        // Then the report should appear in the sidebar.
        expect(getOptionRows()).toHaveLength(1);
    
        // When the report is hidden.
        await act(async () => {
            await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`, {isHidden: true});
        });
    
        // Then the report should not appear in the sidebar.
        expect(getOptionRows()).toHaveLength(0);
    });

    A few more can be found on my test branch. It also includes fixes for console errors that appeared while running these tests, e.g. missing key prop and missing act() calls.

    Todo: check not only for the count of reports but also validate the name, etc.

  10. 43 remaining items

  11. alexpensify commented on Dec 24, 2024

    @alexpensify
    Contributor

    Weekly Update: PR is moving along through the review process

  12. alexpensify commented on Dec 30, 2024

    @alexpensify
    Contributor

    Update: Waiting for this one to go into production


    Heads up, I will be offline until Friday, January 3, 2025, and will not actively watch over this GitHub during that period.

    If this GitHub requires an urgent update, please ask for help in the #expensify-open-source Slack Room. If the inquiry can wait, I'll review it when I return online.

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 6, 2025
  14. changed the title [-][$250] Implement tests for reports that should not be displayed in LHN[/-] [+][HOLD for payment 2025-01-13] [$250] Implement tests for reports that should not be displayed in LHN[/+] on Jan 6, 2025
  15. melvin-bot commented on Jan 6, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Jan 6, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-01-13. 🎊

    For reference, here are some details about the assignees on this issue:

  17. melvin-bot commented on Jan 6, 2025

    @melvin-bot

    @c3024 @alexpensify @c3024 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  18. alexpensify commented on Jan 14, 2025

    @alexpensify
    Contributor

    Contributor: @mkzie2 paid $250 via Upwork
    Contributor+: @c3024 paid $250 via Upwork since it's before the 11/28 date

    --

    Closing - everyone has been paid via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorPlanningChanges still in the thought process

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions