ui: add frontend diagnostics and stable test hooks

This commit is contained in:
a.tolmachev
2026-04-12 11:23:10 +03:00
parent d85f7ddf05
commit 1cb4cbc960
13 changed files with 229 additions and 51 deletions
+32
View File
@@ -0,0 +1,32 @@
const { test, expect } = require('@playwright/test');
const { login } = require('./helpers');
test('shell and wizard expose stable diagnostics hooks', async ({ page }) => {
await login(page);
await page.goto('/');
await expect(page.locator('[data-testid="shell-avatar"]')).toBeVisible();
await page.locator('[data-testid="shell-avatar"]').click();
await expect(page.locator('[data-testid="shell-user-name"]').first()).toBeVisible();
await expect(page.locator('[data-testid="shell-user-role"]').first()).toBeVisible();
await page.goto('/wizard/');
await expect(page.locator('[data-testid="wizard-protocol-grid"]')).toBeVisible();
await expect(page.locator('[data-testid="wizard-protocol-rest"]')).toBeVisible();
await expect(page.locator('[data-testid="wizard-protocol-websocket"]')).toBeVisible();
await expect(page.locator('[data-testid="wizard-protocol-soap"]')).toBeVisible();
await expect(page.locator('html')).toHaveAttribute('data-crank-bootstrap-state', 'ready');
});
test('secrets page exposes stable secret management hooks', async ({ page }) => {
await login(page);
await page.goto('/secrets');
await expect(page.locator('[data-testid="secret-create-button"]')).toBeVisible();
await page.locator('[data-testid="secret-create-button"]').click();
await expect(page.locator('[data-testid="secret-create-modal"]')).toBeVisible();
await expect(page.locator('[data-testid="secret-name-input"]')).toBeVisible();
await expect(page.locator('[data-testid="secret-kind-select"]')).toBeVisible();
await expect(page.locator('[data-testid="secret-submit-button"]')).toBeVisible();
await expect(page.locator('html')).toHaveAttribute('data-crank-bootstrap-state', 'ready');
});