Sentry Integration (補強 SignOz): - Add @sentry/nextjs for frontend error tracking + session replay - Add sentry-sdk[fastapi] for backend error tracking - Create sentry.client/server/edge.config.ts - Integrate with next.config.js + instrumentation.ts - Add Sentry exception capture in FastAPI error handler - Create deployment scripts for Self-Hosted @ 192.168.0.110 CI/CD Fixes: - Fix F821 Undefined name 'Field' in incidents.py - Add NEXT_PUBLIC_API_URL env var to CI build step - Add build-arg to Docker build verification E2E Test Improvements: - Fix strict mode violations in dashboard-acceptance tests - Add timeout increase for Phase 4 demo tests - Make tests more resilient to UI variations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
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 });
|
||
|
||
// 使用相對路徑,baseURL 由 playwright.config.ts 控制
|
||
await page.goto('/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' });
|
||
});
|