"Change workspace" option is shown offline#80720
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
| expect(result).toBe(false); | ||
| }); | ||
|
|
||
| it('returns false if policy is pending delete', async () => { |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
This test case is missing the await Onyx.set() call that is present in all other test cases within the same describe block. While the function being tested (isWorkspaceEligibleForReportChange) doesn't actually read from Onyx (it just checks the object passed to it), maintaining consistency with the existing test pattern is important for maintainability.
Suggested fix:
it('returns false if policy is pending delete', async () => {
const currentUserLogin = employeeEmail;
const newPolicy = {
...createRandomPolicy(1, CONST.POLICY.TYPE.TEAM),
isPolicyExpenseChatEnabled: true,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
};
await Onyx.set(`${ONYXKEYS.COLLECTION.POLICY}${newPolicy.id}`, newPolicy);
const result = isWorkspaceEligibleForReportChange(currentUserLogin, newPolicy);
expect(result).toBe(false);
});Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
Onyx.set here is not really neccessary because we don't need to use storage data on this one.
|
@mkzie2 Performance tests are failing. Any idea why? |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Agree that you can't change workspaces offline.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-app-2026-02-03_15.36.21.mp4Android: mWeb Chromeandroid-chrome-2026-02-03_15.38.54.mp4iOS: HybridAppios-app-2026-02-03_15.31.37.mp4iOS: mWeb Safariios-safari-2026-02-03_15.33.35.mp4MacOS: Chrome / Safaridesktop-chrome-2026-02-03_15.28.40.mp4 |
jjcoffee
left a comment
There was a problem hiding this comment.
Tests well and code looks good. Just the perf tests need sorting - maybe merging main will do the trick?
|
All test passed 👍 |
|
🚧 @Beamanator has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.3.13-1 🚀
|
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.3.15-0 🚀
|
Explanation of Change
Fixed Issues
$ #79075
PROPOSAL: #79075 (comment)
Tests
Precondition: Have 2 Workspaces
Offline tests
QA Steps
Precondition: Have 2 Workspaces
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Screen.Recording.2026-01-29.at.22.09.32.mov
Android: mWeb Chrome
Screen.Recording.2026-01-29.at.22.10.56.mov
iOS: Native
Screen.Recording.2026-01-29.at.22.12.01.mov
iOS: mWeb Safari
Screen.Recording.2026-01-29.at.22.13.58.mov
MacOS: Chrome / Safari
Screen.Recording.2026-01-29.at.22.15.19.mov