Skip to content
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

fix: send split lineitem in payload #1096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class XeroExportSettingModel {
bankAccount: new FormControl(exportSettings?.general_mappings?.bank_account?.id ? findObjectByDestinationId(destinationAttribute, exportSettings.general_mappings.bank_account.id) : null),
autoMapEmployees: new FormControl(exportSettings?.workspace_general_settings?.auto_map_employees),
searchOption: new FormControl(''),
splitExpenseGrouping: new FormControl(exportSettings?.expense_group_settings?.split_expense_grouping)
splitExpenseGrouping: new FormControl(exportSettings?.expense_group_settings?.split_expense_grouping ? exportSettings?.expense_group_settings?.split_expense_grouping : SplitExpenseGrouping.MULTIPLE_LINE_ITEM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Tests need to be updated for splitExpenseGrouping feature

The test files are currently minimal and disabled (using xdescribe). None of them cover the new splitExpenseGrouping functionality. Test coverage should be added for:

  • Form control initialization with default value
  • Form control initialization with existing value
  • Payload construction with splitExpenseGrouping

Key files requiring test updates:

  • src/app/core/services/xero/xero-configuration/xero-export-settings.service.spec.ts
  • src/app/integrations/xero/xero-shared/xero-export-settings/xero-export-settings.component.spec.ts
  • src/app/integrations/xero/xero-onboarding/xero-onboarding-export-settings/xero-onboarding-export-settings.component.spec.ts
🔗 Analysis chain

Verify test coverage for the new splitExpenseGrouping handling

The changes look good overall, but let's ensure they're properly covered by tests.

Let's check for existing test coverage:

Also applies to: 231-231

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for test files that might need updates
rg -l "XeroExportSettingModel" --type ts | grep "spec"

# Search for existing test cases related to split expense grouping
rg "splitExpenseGrouping|split_expense_grouping" --type ts | grep "spec"

Length of output: 125


Script:

#!/bin/bash
# Let's try a broader search for test files related to Xero export settings
rg -l "xero.*export.*settings" --type ts | grep -i "spec\|test"

# Also search for any test files in the same directory
fd ".*spec.ts$|.*test.ts$" -p src/app/core/models/xero/xero-configuration/

# Let's check the actual implementation file to understand the test structure
cat src/app/core/models/xero/xero-configuration/xero-export-settings.model.ts

Length of output: 10508


Script:

#!/bin/bash
# Let's check the test files we found for split expense grouping coverage
cat src/app/core/services/xero/xero-configuration/xero-export-settings.service.spec.ts
cat src/app/integrations/xero/xero-shared/xero-export-settings/xero-export-settings.component.spec.ts
cat src/app/integrations/xero/xero-onboarding/xero-onboarding-export-settings/xero-onboarding-export-settings.component.spec.ts

Length of output: 2185

});
}

Expand Down
Loading