Files
kt-financial-system/test-simple.js
你的用户名 4b4616de1e feat: Add TokenRecords finance management system
- Created new finance application based on Vue Vben Admin
- Implemented transaction management, category management, and loan tracking
- Added person management for tracking financial relationships
- Integrated budget management and financial analytics
- Added data import/export functionality
- Implemented responsive design for mobile support
- Added comprehensive testing with Playwright

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 20:09:48 +08:00

44 lines
1.3 KiB
JavaScript
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 { chromium } from 'playwright';
(async () => {
const browser = await chromium.launch({
headless: false,
slowMo: 500
});
const page = await browser.newPage();
try {
console.log('访问交易管理页面...');
await page.goto('http://localhost:5667/finance/transaction');
await page.waitForTimeout(3000);
console.log('点击新建按钮...');
const createBtn = await page.locator('button').filter({ hasText: '新建' }).first();
await createBtn.click();
console.log('等待弹窗...');
await page.waitForTimeout(2000);
console.log('填写金额...');
const amountInput = await page.locator('input.ant-input-number-input').first();
await amountInput.clear();
await amountInput.fill('100');
console.log('点击提交...');
const submitBtn = await page.locator('button').filter({ hasText: '确定' }).first();
await submitBtn.click();
console.log('等待结果...');
await page.waitForTimeout(3000);
console.log('测试完成!');
} catch (error) {
console.error('错误:', error.message);
} finally {
console.log('浏览器将保持打开10秒请手动检查...');
await page.waitForTimeout(10000);
await browser.close();
}
})();