Skip to content

Remove Manager McTest references from frontend#91517

Closed
ishpaul777 wants to merge 5 commits into
Expensify:mainfrom
ishpaul777:remove-manager-mctest
Closed

Remove Manager McTest references from frontend#91517
ishpaul777 wants to merge 5 commits into
Expensify:mainfrom
ishpaul777:remove-manager-mctest

Conversation

@ishpaul777
Copy link
Copy Markdown
Contributor

Explanation of Change

Manager McTest is no longer supported on the backend. This PR removes all frontend references to Manager McTest, including:

  • Constants: EMAIL.MANAGER_MCTEST, BETAS.NEWDOT_MANAGER_MCTEST, ACCOUNT_ID.MANAGER_MCTEST, and exclusion list entries
  • Utility functions: isSelectedManagerMcTest(), isTestTransactionReport(), getManagerMcTestParticipant(), isManagerMcTestQuickActionReport(), getRestrictedLogins()
  • Special handling: Manager McTest overrides in buildOptimisticIOUReportAction, buildOptimisticReportPreview, getMoneyRequestOptions, shouldDisableThread, money request builder flows, scan receipt participant routing, Quick Action Bar restrictions, and participant search filtering
  • Tests: Removed all Manager McTest-specific test cases and fixtures
  • Cleanup: Removed dangling EXPENSIFY_ACCOUNT_ID_MANAGER_MCTEST from .env.example, updated isTestReceipt JSDoc, and removed MCTEST from cspell.json

This is a fresh branch cherry-picked from PR #91084 onto current main, replacing the original branch that had unrelated history and could not merge cleanly.

Fixed Issues

$ #91068

Tests

  1. Create an expense (Submit flow)

    • Open the app, tap the + FAB > Submit expense
    • Scan a receipt or enter an amount manually
    • Select a participant and submit the expense
    • Verify the expense is created successfully with no errors
  2. Create an expense (Split flow)

    • Open the app, tap + FAB > Split expense
    • Add participants, enter amount, and split
    • Verify the split is created with no errors
  3. Duplicate expense action

    • Find an existing expense, open the secondary actions menu
    • Tap Duplicate
    • Verify the duplicate action works correctly
  4. Quick Action Bar

    • Navigate to a DM chat
    • Verify the Quick Action Bar appears and all quick actions (Submit, Track, etc.) function correctly
    • Verify no errors in the console
  5. Search participants

    • Start creating a new expense
    • On the participant search screen, search for various users
    • Verify Expensify system accounts (Concierge, etc.) behave as expected — no unexpected accounts appear
  6. Thread creation

    • Open an expense report action
    • Verify threading works normally on expense report actions
  7. Verify no console errors

    • Perform all the above flows while monitoring the JS console
    • Verify no errors appear related to Manager McTest or missing references
  • Verify that no errors appear in the JS console

Offline tests

N/A — this is a code removal PR with no new offline behavior.

QA Steps

  1. Create a new Submit expense (scan a receipt) on a personal account with no workspace — verify it works end-to-end
  2. Create a new Submit expense with a manual amount — verify it works
  3. Open an existing expense and use the Duplicate action — verify it works
  4. Check Quick Action Bar on a DM chat — verify quick actions appear and work
  5. Start a new expense and search for participants — verify the search works correctly
  6. Verify no JS console errors throughout all flows
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

MelvinBot and others added 5 commits May 24, 2026 02:39
Manager McTest is no longer supported on the backend. This removes all
frontend references including constants, utility functions, special
handling in money request flows, Quick Action Bar restrictions, and
participant filtering logic.

Co-authored-by: Ishpaul Singh <ishpaul777@users.noreply.github.com>
…Policy and spy canCreateRequest

The per diem test mocked isPaidGroupPolicy but the source code calls isControlPolicy.
Both per diem and time tracking positive tests also need canCreateRequest mocked since
the minimal test data doesn't satisfy the real canCreateRequest conditions.

Co-authored-by: Ishpaul Singh <ishpaul777@users.noreply.github.com>
…t removal

Co-authored-by: Ishpaul Singh <ishpaul777@users.noreply.github.com>
- Update JSDoc comment on isTestReceipt in Transaction.ts (remove manager_mctest reference)
- Delete dangling EXPENSIFY_ACCOUNT_ID_MANAGER_MCTEST from .env.example
- Restore eslint-disable comment in useSearchBulkActions.ts (unrelated removal)

Co-authored-by: Ishpaul Singh <ishpaul777@users.noreply.github.com>
Manager McTest is no longer referenced in the App codebase.
@ishpaul777 ishpaul777 requested review from a team as code owners May 23, 2026 21:09
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 23, 2026

@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot requested review from a team and removed request for a team May 23, 2026 21:09
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 23, 2026

@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@ishpaul777 ishpaul777 closed this May 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 93.84% <ø> (-0.05%) ⬇️
src/libs/OptionsListUtils/index.ts 84.51% <100.00%> (-0.19%) ⬇️
src/libs/QuickActionUtils.ts 31.91% <ø> (-4.45%) ⬇️
src/libs/ReportUtils.ts 83.08% <100.00%> (+0.04%) ⬆️
src/libs/actions/IOU/MoneyRequest.ts 76.25% <100.00%> (-0.67%) ⬇️
src/libs/actions/IOU/MoneyRequestBuilder.ts 87.60% <100.00%> (+3.45%) ⬆️
src/pages/iou/request/ParticipantSearchResults.tsx 0.66% <ø> (+0.02%) ⬆️
...es/iou/request/step/IOURequestStepConfirmation.tsx 66.56% <100.00%> (-0.11%) ⬇️
...RequestStepScan/components/MobileWebCameraView.tsx 0.00% <ø> (ø)
...st/step/IOURequestStepScan/hooks/useReceiptScan.ts 91.30% <100.00%> (ø)
... and 1 more
... and 7 files with indirect coverage changes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants