WP-11: contract and failing tests for package upgrades
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / ui (push) Has been cancelled

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Dennis Nemec
2026-09-02 22:24:40 +02:00
parent b6ddb8889d
commit 1f56f015a2
18 changed files with 524 additions and 2 deletions

View File

@ -35,3 +35,15 @@ describe('PackageTable', () => {
expect(rows(w)[0]).toContain('microk8s')
})
})
describe('PackageTable selection', () => {
it('lets the user select upgradable packages and emits the names', async () => {
const w = mount(PackageTable, { props: { packages: pkgs, selectable: true } })
const boxes = w.findAll('input[name=select]')
expect(boxes).toHaveLength(2) // only upgradable rows get a checkbox
await boxes[0].setValue(true)
expect(w.emitted('update:selected')!.at(-1)![0]).toEqual(['openssl'])
await boxes[1].setValue(true)
expect(w.emitted('update:selected')!.at(-1)![0]).toEqual(['openssl', 'curl'])
})
})