Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(client): drop the two new non-null assertions in the addon card tests

Mauricef668eee22709
diff --git a/client/src/components/Admin/AddonManager.test.tsx b/client/src/components/Admin/AddonManager.test.tsx
index 2340d3db6..540915913 100644
--- a/client/src/components/Admin/AddonManager.test.tsx
+++ b/client/src/components/Admin/AddonManager.test.tsx
@@ -697,7 +697,7 @@ describe('AddonManager', () => {
server.use(addonsRoute([buildAddon({ id: 'packing', name: 'Lists', icon: 'ListChecks', type: 'trip', enabled: true })]));
const onToggle = vi.fn();
const { unmount } = render(<AddonManager flightLive={{ on: false, locked: false, managed: false, onToggle }} />);
- const trip = (await screen.findByRole('heading', { name: 'Trip' })).closest('section')!;
+ const trip = (await screen.findByRole('heading', { name: 'Trip' })).closest('section') as HTMLElement;
await userEvent.click(within(trip).getByRole('button', { name: 'Follow booked flights live' }));
expect(onToggle).toHaveBeenCalledTimes(1);
// The count stays the addons': the flight row is an instance option beside them.
@@ -713,7 +713,7 @@ describe('AddonManager', () => {
vi.spyOn(mailIngestRepo, 'adminSettings').mockResolvedValue({ mail_ingest_enabled: 'true' });
vi.spyOn(mailIngestRepo, 'adminStatus').mockRejectedValue(new Error('no status'));
render(<AddonManager mailImport />);
- const integration = (await screen.findByRole('heading', { name: 'Integration' })).closest('section')!;
+ const integration = (await screen.findByRole('heading', { name: 'Integration' })).closest('section') as HTMLElement;
expect(within(integration).getByText('Booking mail import')).toBeInTheDocument();
await userEvent.click(await within(integration).findByRole('button', { name: 'Set up mail import' }));
const dialog = await screen.findByRole('dialog');