Files
Infrastruktur-Monitoring-Sy…/frontend/e2e/updates.spec.ts
Dennis Nemec 7b6d242988
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / ui (push) Has been cancelled
WP-10: contract and failing tests for OS and package inventory
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 22:19:25 +02:00

19 lines
906 B
TypeScript

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