Files
awoooi/apps/web/tests/e2e/rbac-screenshot.spec.ts
OG T 9bff46a1b0 feat: integrate Sentry + fix CI/CD issues
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>
2026-03-24 15:19:52 +08:00

29 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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' });
});