fix(e2e): add full E2E infrastructure (workflow, scripts, tests)

- Copy deploy/teardown scripts from add-e2e-infra branch
- Copy Playwright config and test files
- Add e2e script and @playwright/test devDependency
- Update E2E workflow to use pnpm-capable workflow branch with namespace param

PRI-634 follow-up
This commit is contained in:
2026-05-05 12:12:37 +00:00
committed by Hugh Hackman [agent]
parent 368ad4021d
commit 8481863996
6 changed files with 339 additions and 2 deletions
+42
View File
@@ -0,0 +1,42 @@
import { test, expect } from '@playwright/test';
test.describe('argocd plugin smoke tests', () => {
test('sidebar contains argocd 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: /argocd/i })).toBeVisible();
});
test('argocd sidebar entry navigates to argocd 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: /argocd/i });
await expect(entry).toBeVisible();
await entry.click();
await expect(page).toHaveURL(/argocd/);
await expect(page.getByRole('heading', { name: /argocd/i })).toBeVisible();
});
test('argocd page renders content', async ({ page }) => {
await page.goto('/c/main/argocd');
await expect(page.getByRole('heading', { name: /argocd/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 argocd plugin entry', async ({ page }) => {
await page.goto('/settings/plugins');
const pluginEntry = page.locator('text=/argocd/i').first();
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
});
});