test: bring the packing, todo and dashboard changes in line with the CI gates

Lower the lint and strict baselines the redesign made smaller, keep the
detail window and the todo tab under the complexity limit by moving their
choices into helpers, read the toast in the detail test through its module
rather than a window global, keep the new dialog focus case in the module's
existing test file, show the panel's progress once in the standalone header,
and point the planner wiring tests at the Lists menu.
This commit is contained in:
Maurice
2026-11-15 12:30:14 +01:00
parent 783a697d95
commit a65342574a
11 changed files with 78 additions and 90 deletions
@@ -95,7 +95,7 @@ describe('ArtikelZeile — at rest', () => {
const { container } = setup({ item: buildPackingItem({ id: 1, name: 'Socks', quantity: 5, packed_quantity: 2 } as Partial<PackingItem>) })
expect(screen.getByText('2/5')).toBeInTheDocument()
expect(screen.queryByText('×5')).toBeNull()
expect(container.querySelector<HTMLElement>('.packing-check')!.style.borderColor).toBe('var(--accent)')
expect(container.querySelector<HTMLElement>('.packing-check')?.getAttribute('style')).toContain('solid var(--accent)')
})
it('FE-W5ROW-006: hovering brings up the chevron, leaving puts it away', () => {
@@ -161,7 +161,9 @@ describe('ArtikelZeile — badges', () => {
expect(badge).toHaveTextContent('B+1')
fireEvent.mouseEnter(badge)
const rows = within(await screen.findByRole('tooltip')).getAllByRole('listitem')
expect(rows.map(r => r.textContent)).toEqual(['Bob', 'cleo'])
expect(rows).toHaveLength(2)
expect(rows[0]).toHaveTextContent('Bob')
expect(rows[1]).toHaveTextContent('cleo')
})
it('FE-W5ROW-012: co-bringers alone still show, without an owner', () => {
@@ -169,7 +171,7 @@ describe('ArtikelZeile — badges', () => {
item: buildPackingItem({ id: 1, name: 'Stove', is_private: 0, owner_id: null, owner_username: null, contributors: [{ user_id: 2, username: 'alice' }] } as unknown as Partial<PackingItem>),
tripMembers: MEMBERS,
})
expect(screen.getByLabelText('brought by alice')).toHaveTextContent(/^A$/)
expect(screen.getByLabelText('brought by alice')).toHaveTextContent(/^a$/i)
})
it('FE-W5ROW-013: a private item shows no bringer faces', () => {