20 lines
1.1 KiB
TypeScript
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 })
|
|
})
|