-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[No QA] Unable to clear the RBR from the archived workspace chat - Add Unit test #57830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/unit/SidebarUtilsTest.ts
Outdated
private_isArchived: DateUtils.getDBTime(), | ||
}; | ||
|
||
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${MOCK_REPORT.reportID}`, MOCK_REPORT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${MOCK_REPORT.reportID}`, MOCK_REPORT); |
Not needed
tests/unit/SidebarUtilsTest.ts
Outdated
}; | ||
|
||
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${MOCK_REPORT.reportID}`, MOCK_REPORT); | ||
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${MOCK_REPORT.reportID}`, reportNameValuePairs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${MOCK_REPORT.reportID}`, reportNameValuePairs); | |
await Onyx.set(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${MOCK_REPORT.reportID}`, reportNameValuePairs); |
NAB. Just so we don't confuse values that were set in other tests (if any)
tests/unit/SidebarUtilsTest.ts
Outdated
it('returns false when report is archived', () => { | ||
const MOCK_REPORT: Report = { | ||
reportID: '5', | ||
errorFields: { | ||
export: { | ||
error: 'Some error occurred', | ||
}, | ||
}, | ||
}; | ||
const MOCK_REPORT_ACTIONS: OnyxEntry<ReportActions> = {}; | ||
const MOCK_TRANSACTION_VIOLATIONS: OnyxCollection<TransactionViolation[]> = {}; | ||
|
||
const result = SidebarUtils.shouldShowRedBrickRoad(MOCK_REPORT, MOCK_REPORT_ACTIONS, false, MOCK_TRANSACTION_VIOLATIONS); | ||
|
||
expect(result).toBe(false); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you set the report value pairs here too or add a comment that explains that this report is already archived from previous tests
@s77rt I updated PR. Please take a look. Thanks |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@thelullabyy Please add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.13-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.13-5 🚀
|
Explanation of Change
Fixed Issues
$#56724
PROPOSAL:#56724 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop