Files
awoooi/apps/web/tests/e2e/rbac-screenshot.spec.ts
OG T 196d269b92 feat: add all application source code
- apps/api: FastAPI backend with Dockerfile
- apps/web: Next.js frontend with Dockerfile
- apps/sensor: Signal collection agent
- packages: shared packages

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-22 18:57:44 +08:00

28 lines
1012 B
TypeScript

import { test } from '@playwright/test';
test('Screenshot RBAC permission UI', async ({ page }) => {
// Set larger viewport for better visibility
await page.setViewportSize({ width: 1600, height: 1000 });
await page.goto('http://localhost:3333/zh-TW/demo');
await page.waitForTimeout(4000);
// Scroll to show HITL section with approval cards
await page.evaluate(() => window.scrollTo(0, 550));
await page.waitForTimeout(1500);
await page.screenshot({ path: 'test-results/phase3-hitl-section-final.png' });
// Scroll more to see full approval cards with permission badge
await page.evaluate(() => window.scrollTo(0, 750));
await page.waitForTimeout(1000);
await page.screenshot({ path: 'test-results/phase3-rbac-permission-badge.png' });
// Scroll to bottom to see user role display
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
await page.waitForTimeout(1000);
await page.screenshot({ path: 'test-results/phase3-user-role-display.png' });
});