- 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>
68 lines
2.0 KiB
TypeScript
68 lines
2.0 KiB
TypeScript
/**
|
|
* Visual Armor Upgrade - Phase 2.5 視覺裝甲升級驗收
|
|
* ================================================
|
|
* 截圖驗證 Magic UI 特效與 shadcn/ui 風格升級
|
|
*/
|
|
|
|
import { test, expect } from '@playwright/test'
|
|
|
|
test.describe('Visual Armor Upgrade', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
// Navigate to demo page
|
|
await page.goto('/zh-TW/demo')
|
|
// Wait for SSE connection
|
|
await page.waitForTimeout(3000)
|
|
})
|
|
|
|
test('capture full dashboard with Magic UI effects', async ({ page }) => {
|
|
// Full page screenshot
|
|
await page.screenshot({
|
|
path: 'test-results/visual-armor-dashboard.png',
|
|
fullPage: true,
|
|
})
|
|
|
|
// Verify LiveDashboard is rendered
|
|
const dashboard = page.locator('h2:has-text("即時戰情室")')
|
|
await expect(dashboard).toBeVisible()
|
|
})
|
|
|
|
test('capture HITL approval cards with Border Beam', async ({ page }) => {
|
|
// Create a CRITICAL approval for Border Beam effect
|
|
const criticalBtn = page.locator('button:has-text("CRITICAL")')
|
|
if (await criticalBtn.isVisible()) {
|
|
await criticalBtn.click()
|
|
await page.waitForTimeout(2000)
|
|
}
|
|
|
|
// Wait for cards to render
|
|
await page.waitForTimeout(1000)
|
|
|
|
// Screenshot the approval section
|
|
const approvalSection = page.locator('section:has(h2:has-text("HITL"))')
|
|
if (await approvalSection.isVisible()) {
|
|
await approvalSection.screenshot({
|
|
path: 'test-results/visual-armor-approvals.png',
|
|
})
|
|
}
|
|
|
|
// Full page with effects
|
|
await page.screenshot({
|
|
path: 'test-results/visual-armor-full.png',
|
|
fullPage: true,
|
|
})
|
|
})
|
|
|
|
test('verify ClawBot panel with Brain icon', async ({ page }) => {
|
|
const clawbotPanel = page.locator('h3:has-text("ClawBot")')
|
|
await expect(clawbotPanel).toBeVisible()
|
|
|
|
// Screenshot ClawBot panel
|
|
const panel = page.locator('.glass-copilot').first()
|
|
if (await panel.isVisible()) {
|
|
await panel.screenshot({
|
|
path: 'test-results/visual-armor-clawbot.png',
|
|
})
|
|
}
|
|
})
|
|
})
|