mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
fix(ci): repair mobile tests and lint diagnostics
Restore the saved-list filter import and test the actual sheet backdrop. Remove unsafe fixture assertions and apply formatting reported by CI. Reuse the current lint results and compare base files in sequence so warning diagnostics can finish without exhausting the heap.
This commit is contained in:
@@ -958,7 +958,9 @@ describe('MCostsTab', () => {
|
||||
expect(screen.getByText('costs.byCategory')).not.toBeVisible()
|
||||
fireEvent.click(budgetSummary())
|
||||
expect(screen.getByText('costs.byCategory')).toBeVisible()
|
||||
expect(within(budgetSummary().parentElement!).getAllByText('$185.00')).toHaveLength(1)
|
||||
const summary = budgetSummary().parentElement
|
||||
if (!summary) throw new Error('Expected the budget summary')
|
||||
expect(within(summary).getAllByText('$185.00')).toHaveLength(1)
|
||||
})
|
||||
|
||||
it('FE-MOB-COSTT-055: in Arabic a signed balance and an amount read as one left-to-right run, and a payment names who paid whom in reading order', async () => {
|
||||
|
||||
@@ -360,7 +360,9 @@ describe('MPackingListTab', () => {
|
||||
|
||||
const input = screen.getByPlaceholderText('packing.newCategoryPlaceholder')
|
||||
fireEvent.change(input, { target: { value: 'Documents' } })
|
||||
await act(async () => { fireEvent.submit((input as HTMLInputElement).form!) })
|
||||
const form = input.closest('form')
|
||||
if (!form) throw new Error('Expected the new list form')
|
||||
await act(async () => { fireEvent.submit(form) })
|
||||
|
||||
expect(planner.tripActions.addPackingItem).toHaveBeenCalledWith(3, { name: '...', category: `Documents${ZERO_WIDTH}`, visibility: 'common' })
|
||||
})
|
||||
@@ -383,7 +385,9 @@ describe('MPackingListTab', () => {
|
||||
fireEvent.click(screen.getByRole('button', { name: 'packing.addCategory' }))
|
||||
const field = screen.getByPlaceholderText('packing.newCategoryPlaceholder')
|
||||
fireEvent.change(field, { target: { value: 'Gear' } })
|
||||
await act(async () => { fireEvent.submit((field as HTMLInputElement).form!) })
|
||||
const form = field.closest('form')
|
||||
if (!form) throw new Error('Expected the new list form')
|
||||
await act(async () => { fireEvent.submit(form) })
|
||||
expect(planner.toast.error).toHaveBeenCalledWith('packing.toast.addError')
|
||||
|
||||
fireEvent.keyDown(screen.getByPlaceholderText('packing.newCategoryPlaceholder'), { key: 'Escape' })
|
||||
|
||||
@@ -135,7 +135,9 @@ describe('prepareForOffline — selected trip', () => {
|
||||
expect(list).not.toHaveBeenCalled();
|
||||
expect(await offlineDb.trips.get(other.id)).toBeDefined();
|
||||
expect(await offlineDb.trips.get(trip.id)).toBeDefined();
|
||||
expect(await offlineDb.blobCache.get(bundle.files[0]!.url!)).toBeDefined();
|
||||
const fileUrl = bundle.files[0]?.url;
|
||||
if (!fileUrl) throw new Error('Expected a file URL in the trip bundle');
|
||||
expect(await offlineDb.blobCache.get(fileUrl)).toBeDefined();
|
||||
expect(getOfflinePrefs().pinnedTripIds).toEqual([trip.id]);
|
||||
expect(getOfflinePrefs().disabledTripIds).not.toContain(trip.id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user