WP-10: contract and failing tests for OS and package inventory
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
18
frontend/e2e/updates.spec.ts
Normal file
18
frontend/e2e/updates.spec.ts
Normal 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)
|
||||
})
|
||||
Reference in New Issue
Block a user