Files
Infrastruktur-Monitoring-Sy…/frontend/e2e/upgrade.spec.ts
Dennis Nemec 1f56f015a2
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / ui (push) Has been cancelled
WP-11: contract and failing tests for package upgrades
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 22:24:40 +02:00

20 lines
1.1 KiB
TypeScript

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 })
})