WP-10: contract and failing tests for OS and package inventory
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:19:25 +02:00
parent b6c3ddf040
commit 7b6d242988
21 changed files with 698 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { test, expect } from '@playwright/test'
test('updates page shows OS info and packages after a refresh', async ({ page }) => {
await page.goto('/login')
await page.getByLabel('Email').fill('admin@example.com')
await page.getByLabel('Password').fill('admin-password-123')
await page.getByRole('button', { name: 'Sign in' }).click()
await page.getByRole('link', { name: 'Updates' }).click()
await page.getByRole('button', { name: 'Refresh inventory' }).click()
await expect(page.getByTestId('os-name')).toContainText('Debian', { timeout: 15_000 })
await expect(page.getByText('Reboot required')).toBeVisible()
await expect(page.getByTestId('summary-upgradable')).toContainText('3')
await page.getByLabel('Upgradable only').check()
await expect(page.getByRole('row', { name: /openssl/ })).toBeVisible()
await expect(page.getByRole('row', { name: /bash/ })).toHaveCount(0)
})