-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Expensify Card - "Smart limit" is not shown as grayed-out option when "Add approval' is disabled #56187
Comments
Triggered auto assignment to @twisterdotcom ( |
ProposalPlease re-state the problem that we are trying to solve in this issue."Smart limit" is not shown as grayed-out option when "Add approval' is disabled What is the root cause of that problem?We do not display the option if the add approval flow is disabled:
This causes the value to be hidden What changes do you think we should make in order to solve the problem?We need to show the option if it is selected and add pending action if approvals is not enabled: if (areApprovalsConfigured || typeSelected === CONST.EXPENSIFY_CARD.LIMIT_TYPES.SMART) {
options.push({
value: CONST.EXPENSIFY_CARD.LIMIT_TYPES.SMART,
text: translate('workspace.card.issueNewCard.smartLimit'),
alternateText: translate('workspace.card.issueNewCard.smartLimitDescription'),
keyForList: CONST.EXPENSIFY_CARD.LIMIT_TYPES.SMART,
isSelected: typeSelected === CONST.EXPENSIFY_CARD.LIMIT_TYPES.SMART,
isDisabled: !areApprovalsConfigured,
});
} According to OP we need to disable the option if the approval flow is disable
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/a this is a UI bug, or we can write a UI test to mock this condition and check if the option is not pressable and the submit button is disabled too (but it's not necessary tbh) What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue."Smart limit" is not shown as grayed-out option when "Smart limit" is selected and "Add approval' is disabled What is the root cause of that problem?At the moment, we only display "Smart limit" when "Add approval" is configured
App/src/pages/workspace/expensifyCard/WorkspaceEditCardLimitTypePage.tsx Lines 109 to 117 in 741bd4a
What changes do you think we should make in order to solve the problem?
if (areApprovalsConfigured || initialLimitType === CONST.EXPENSIFY_CARD.LIMIT_TYPES.SMART) {
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional) |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.93-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A https://expensify.testrail.io/index.php?/tests/view/5544625
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Workspace Settings
Action Performed:
Precondition:
Expected Result:
When "Smart limit" is selected and "Add approvals" is disabled, opening Limit type field should still display the list with the selected "Smart limit" in grayed-out style (like when a disabled category is selected in expense details page).
Actual Result:
When "Smart limit" is selected and "Add approvals" is disabled, Limit type field list does not display the selected "Smart limit" at all.
It is only visible from the card details page.
Workaround:
Unknown
Platforms:
Screenshots/Videos
bug.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: