Files
headlamp-kube-vip-plugin/e2e/kube-vip.spec.ts
T
privilegedescalation-engineer[bot] 1c5e50ce8c docs(security): document GHSA-848j-6mx2-7j84 elliptic as accepted risk (#59)
* Add E2E test infrastructure for kube-vip plugin

Scaffolded via e2e-scaffold.sh (proactive improvement).
- playwright.config.ts, e2e/auth.setup.ts, e2e/kube-vip.spec.ts
- scripts/deploy-e2e-headlamp.sh, scripts/teardown-e2e-headlamp.sh
- .github/workflows/e2e.yaml uses reusable workflow
- @playwright/test ^1.58.2 devDep

- PRI-641

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* Fix E2E workflow: use pnpm-capable reusable workflow branch

The reusable plugin-e2e.yaml@main lacks pnpm support. Switching to
the PR branch that has pnpm detector, Corepack setup, and pnpm commands.

Will revert to @main once PR #141 merges.

- PRI-619 E2E fix

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* docs(security): document GHSA-848j-6mx2-7j84 elliptic as accepted risk

* fix(e2e): reference @main workflow after .github merge

Co-Authored-By: Paperclip <noreply@paperclip.ing>

---------

Co-authored-by: Chris Farhood <chris@farhood.org>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-05-06 00:44:27 +00:00

43 lines
1.6 KiB
TypeScript

import { test, expect } from '@playwright/test';
test.describe('kube-vip plugin smoke tests', () => {
test('sidebar contains kube-vip entry', async ({ page }) => {
await page.goto('/');
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
await expect(sidebar).toBeVisible({ timeout: 15_000 });
await expect(sidebar.getByRole('button', { name: /kube.vip/i })).toBeVisible();
});
test('kube-vip sidebar entry navigates to kube-vip view', async ({ page }) => {
await page.goto('/');
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
await expect(sidebar).toBeVisible({ timeout: 15_000 });
const entry = sidebar.getByRole('button', { name: /kube.vip/i });
await expect(entry).toBeVisible();
await entry.click();
await expect(page).toHaveURL(/kube-vip/);
await expect(page.getByRole('heading', { name: /kube.vip/i })).toBeVisible();
});
test('kube-vip page renders content', async ({ page }) => {
await page.goto('/c/main/kube-vip');
await expect(page.getByRole('heading', { name: /kube.vip/i })).toBeVisible({
timeout: 15_000,
});
const hasTable = await page.locator('table').first().isVisible().catch(() => false);
const hasContent = await page.locator('[class*="Mui"]').first().isVisible().catch(() => false);
expect(hasTable || hasContent).toBe(true);
});
test('plugin settings page shows kube-vip plugin entry', async ({ page }) => {
await page.goto('/settings/plugins');
const pluginEntry = page.locator('text=/kube.vip/i').first();
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
});
});