feat(admin): 添加用户管理相关文件
添加用户管理视图、API和状态管理文件
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('debug-white-screen', async ({ page }) => {
|
||||
const errors: string[] = [];
|
||||
const consoleMessages: string[] = [];
|
||||
|
||||
page.on('pageerror', error => {
|
||||
errors.push(`Page Error: ${error.message}\nStack: ${error.stack}`);
|
||||
});
|
||||
|
||||
page.on('console', msg => {
|
||||
consoleMessages.push(`[${msg.type()}] ${msg.text()}`);
|
||||
});
|
||||
|
||||
page.on('requestfailed', request => {
|
||||
consoleMessages.push(`[REQUEST FAILED] ${request.url()} - ${request.failure()?.errorText}`);
|
||||
});
|
||||
|
||||
await page.goto('http://localhost:5173', { waitUntil: 'networkidle' });
|
||||
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
console.log('\n=== Console Messages ===');
|
||||
consoleMessages.forEach(msg => console.log(msg));
|
||||
|
||||
console.log('\n=== Page Errors ===');
|
||||
errors.forEach(error => console.log(error));
|
||||
|
||||
const pageContent = await page.content();
|
||||
console.log('\n=== Page Content (first 500 chars) ===');
|
||||
console.log(pageContent.substring(0, 500));
|
||||
|
||||
const bodyText = await page.locator('body').textContent();
|
||||
console.log('\n=== Body Text ===');
|
||||
console.log(bodyText);
|
||||
|
||||
await page.screenshot({ path: 'test-results/debug-white-screen.png', fullPage: true });
|
||||
|
||||
expect(errors.length).toBe(0);
|
||||
});
|
||||
Reference in New Issue
Block a user