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

@ -0,0 +1,19 @@
import { test, expect } from '@playwright/test'
test('admin updates a selected package and sees the live log', 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 })
const row = page.getByRole('row', { name: /openssl/ })
await row.getByRole('checkbox').check()
await page.getByRole('button', { name: 'Update selected (1)' }).click()
await page.getByRole('button', { name: 'Confirm update' }).click()
await expect(page.getByTestId('upgrade-log')).toContainText('openssl', { timeout: 15_000 })
await expect(page.getByTestId('upgrade-log')).toContainText('Setting up', { timeout: 15_000 })
await expect(page.getByText('Update finished')).toBeVisible({ timeout: 15_000 })
})