Conversation
Contributor
Author
|
Closing in favour of https://github.com/Expensify/App/pull/99997/changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
The
test / test (job 2)job started failing onmainafter Allow full-access copilots to add new company card feeds merged. The failure is intests/ui/WorkspaceCompanyCardPageEmptyStateTest.tsx:That PR changed
WorkspaceCompanyCardPageEmptyStateto readisDelegateAccessRestrictedfromuseDelegateNoAccessStateinstead ofisActingAsDelegate, so that a full-access copilot can add a card feed and only a submitter only delegate is blocked. The test's mock ofuseDelegateNoAccessStatestill returned onlyisActingAsDelegate, so the component readisDelegateAccessRestrictedasundefined, took the normal navigation path, and never calledshowDelegateNoAccessModal.This change updates the mock to return
isDelegateAccessRestricted, renames the mock variable to match, and renames the test case to say "submitter only delegate", which is whatisDelegateAccessRestrictednow means (isActingAsDelegate && isDelegateOnlySubmitter). No production code is touched.Fixed Issues
$ #99996
PROPOSAL:
Tests
npx jest tests/ui/WorkspaceCompanyCardPageEmptyStateTest.tsx.shows the delegate no access modal instead of any navigation for a submitter only delegate.mainand run the same command.Expected number of calls: 1, Received number of calls: 0, which confirms this branch is what fixes it.Offline tests
Not applicable. This change only touches a Jest test file and has no runtime or network behavior.
QA Steps
Not applicable, the title includes "[No QA]". This change only touches a Jest test file, so there is no user-facing behavior to verify on staging.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Not applicable, this change only touches a Jest test file.
Android: mWeb Chrome
Not applicable, this change only touches a Jest test file.
iOS: Native
Not applicable, this change only touches a Jest test file.
iOS: mWeb Safari
Not applicable, this change only touches a Jest test file.
MacOS: Chrome / Safari
Not applicable, this change only touches a Jest test file.