mitlist/fe/src/components/__tests__/ReceiptScannerModal.spec.ts
mohamad d6c5e6fcfd chore: Remove package-lock.json and enhance financials API with user summaries
This commit includes the following changes:

- Deleted the `package-lock.json` file to streamline dependency management.
- Updated the `financials.py` endpoint to return a comprehensive user financial summary, including net balance, total group spending, debts, and credits.
- Enhanced the `expense.py` CRUD operations to handle enum values and improve error handling during expense deletion.
- Introduced new schemas in `financials.py` for user financial summaries and debt/credit tracking.
- Refactored the costs service to improve group balance summary calculations.

These changes aim to improve the application's financial tracking capabilities and maintain cleaner dependency management.
2025-06-28 21:37:26 +02:00

16 lines
654 B
TypeScript

import { mount } from '@vue/test-utils'
import { describe, it, expect } from 'vitest'
import ReceiptScannerModal from '../ReceiptScannerModal.vue'
describe('ReceiptScannerModal.vue', () => {
it('rejects non-image files', async () => {
const wrapper = mount(ReceiptScannerModal)
await wrapper.setProps({ modelValue: true })
const fileInput = wrapper.find('input[type="file"]')
const fakeFile = new File(['test'], 'test.pdf', { type: 'application/pdf' })
await fileInput.trigger('change', { target: { files: [fakeFile] } })
expect(wrapper.text()).toContain('Only image files are supported')
})
})