feat: 个人记账与预算管理系统 MVP 初始版本

This commit is contained in:
2026-04-28 22:57:38 +08:00
commit d2b2e9887a
88 changed files with 29512 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
const { chromium } = require('playwright');
(async () => {
console.log('🚀 启动浏览器自动化测试...\n');
const browser = await chromium.launch({
headless: false,
slowMo: 500
});
const page = await browser.newPage();
// 打开预算页面
console.log('📄 打开预算页面: http://localhost:5173/budget');
await page.goto('http://localhost:5173/budget', { waitUntil: 'networkidle' });
await page.waitForTimeout(3000);
// 截图
await page.screenshot({ path: 'budget-visual-check.png', fullPage: true });
console.log('📸 截图已保存: budget-visual-check.png');
// 获取页面文本内容
const pageText = await page.textContent('body');
console.log('\n📋 页面内容预览:');
console.log('='.repeat(50));
// 查找关键信息
if (pageText.includes('超支')) {
console.log('✅ 发现"超支"标签');
} else if (pageText.includes('剩余')) {
console.log('⚠️ 显示"剩余"标签');
}
// 等待用户查看
console.log('\n⏳ 浏览器将保持打开 10 秒,请查看页面...');
await page.waitForTimeout(10000);
await browser.close();
console.log('\n✅ 测试完成!');
})();