WP-12: contract and failing tests for the Kubernetes overview
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
21
frontend/e2e/cluster.spec.ts
Normal file
21
frontend/e2e/cluster.spec.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { test, expect } from '@playwright/test'
|
||||
|
||||
test('cluster page shows node, workloads and lets an admin restart a workload', 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: 'Kubernetes' }).click()
|
||||
|
||||
await expect(page.getByTestId('node-version')).toContainText('v1.32')
|
||||
const row = page.getByRole('row', { name: /gitea-postgresql/ })
|
||||
await expect(row).toContainText('statefulset')
|
||||
page.once('dialog', (d) => d.accept())
|
||||
await page
|
||||
.getByRole('row', { name: /^gitea deployment/ })
|
||||
.getByRole('button', { name: 'Restart' })
|
||||
.click()
|
||||
await expect(page.getByRole('status')).toContainText('Restart requested')
|
||||
})
|
||||
Reference in New Issue
Block a user