test: hold the audit follow-ups to the test, lint, theme and size ratchets

The packing row tests read the TREK tooltip and the accessible name instead
of the title the badges no longer carry, the journey delete suite takes its
service from the module over a snapshot db and seeds through the row
factories, the storage notifier suite builds its subject once, the POI
layer follows the view only while it has POIs, the collections repository
reads the list's places through its own query, and the baselines the moved
code left smaller come down with it.
This commit is contained in:
Maurice
2026-11-05 15:05:59 +01:00
parent 1f89a13f92
commit 4bc764eb6a
12 changed files with 77 additions and 80 deletions
@@ -379,13 +379,16 @@ describe('ArtikelZeile — category picker', () => {
})
describe('ArtikelZeile — sharing badges', () => {
it('FE-W5ROW-018: an item somebody else brings shows their name', () => {
it('FE-W5ROW-018: an item somebody else brings shows their name in the TREK tooltip', async () => {
setup({
item: buildPackingItem({ id: 1, name: 'Stove', is_private: 1, owner_id: 2, owner_username: 'Bob' } as Partial<PackingItem>),
currentUserId: 1,
})
expect(screen.getByLabelText('by Bob')).toHaveAttribute('title', 'by Bob')
const badge = screen.getByLabelText('by Bob')
expect(badge).not.toHaveAttribute('title')
fireEvent.mouseEnter(badge)
expect(await screen.findByRole('tooltip')).toHaveTextContent('by Bob')
})
it('FE-W5ROW-019: a nameless bringer degrades to an empty name', () => {
@@ -394,10 +397,10 @@ describe('ArtikelZeile — sharing badges', () => {
currentUserId: 1,
})
expect(screen.getByTitle('by')).toBeInTheDocument()
expect(screen.getByLabelText('by')).toBeInTheDocument()
})
it('FE-W5ROW-020: an item shared by me counts its recipients', () => {
it('FE-W5ROW-020: an item shared by me counts its recipients', async () => {
setup({
item: buildPackingItem({
id: 1, name: 'Stove', is_private: 1, owner_id: 1,
@@ -407,10 +410,11 @@ describe('ArtikelZeile — sharing badges', () => {
})
expect(screen.getByLabelText('shared with 2')).toHaveTextContent('2')
expect(screen.getByTitle('shared with 2: alice, bob')).toBeInTheDocument()
fireEvent.mouseEnter(screen.getByLabelText('shared with 2'))
expect(await screen.findByRole('tooltip')).toHaveTextContent('shared with 2: alice, bob')
})
it('FE-W5ROW-021: a common item names its bringer and counts co-bringers', () => {
it('FE-W5ROW-021: a common item names its bringer and counts co-bringers', async () => {
setup({
item: buildPackingItem({
id: 1, name: 'Stove', is_private: 0, owner_username: 'Bob',
@@ -419,8 +423,15 @@ describe('ArtikelZeile — sharing badges', () => {
currentUserId: 1,
})
// The bringer's initial on an avatar, the co-bringers as a count; the title names everyone (#2782).
expect(screen.getByTitle('brought by Bob, cleo')).toHaveTextContent('B+1')
// The bringer's initial on an avatar, the co-bringers as a "+N" circle; the tooltip
// names everyone, each on a line of their own (#2782).
const badge = screen.getByLabelText('brought by Bob, cleo')
expect(badge).toHaveTextContent('B+1')
fireEvent.mouseEnter(badge)
const rows = within(await screen.findByRole('tooltip')).getAllByRole('listitem')
expect(rows).toHaveLength(2)
expect(rows[0]).toHaveTextContent('Bob')
expect(rows[1]).toHaveTextContent('cleo')
})
it('FE-W5ROW-022: a bringer without co-bringers shows no counter', () => {
@@ -429,7 +440,7 @@ describe('ArtikelZeile — sharing badges', () => {
currentUserId: 1,
})
expect(screen.getByTitle('brought by Bob')).toHaveTextContent(/^B$/)
expect(screen.getByLabelText('brought by Bob')).toHaveTextContent(/^B$/)
})
it('FE-W5ROW-023: the placeholder row carries no badges and no share control', () => {