Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
68
frontend/detailed-test.js
Normal file
68
frontend/detailed-test.js
Normal file
@@ -0,0 +1,68 @@
|
||||
const { chromium } = require('playwright');
|
||||
|
||||
async function detailedTest() {
|
||||
const browser = await chromium.launch({
|
||||
headless: false,
|
||||
slowMo: 2000
|
||||
});
|
||||
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
|
||||
// 监听所有控制台消息并过滤
|
||||
page.on('console', msg => {
|
||||
const text = msg.text();
|
||||
if (text.includes('🔄') || text.includes('🖱️') || text.includes('📡') || text.includes('🎯')) {
|
||||
console.log(`🎯 重要调试信息: ${text}`);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
console.log('1. 开始登录...');
|
||||
await page.goto('http://localhost:8891/login');
|
||||
await page.fill('input[type="text"]', 'admin');
|
||||
await page.fill('input[type="password"]', '111111');
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
console.log('2. 访问主页...');
|
||||
await page.goto('http://localhost:8891/home');
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
console.log('3. 检查页面元素...');
|
||||
const submenuCount = await page.locator('.ivu-menu-submenu-title').count();
|
||||
const menuItemCount = await page.locator('.ivu-menu-item').count();
|
||||
console.log(` 子菜单数量: ${submenuCount}`);
|
||||
console.log(` 菜单项数量: ${menuItemCount}`);
|
||||
|
||||
if (submenuCount > 0) {
|
||||
console.log('4. 展开第一个子菜单...');
|
||||
await page.click('.ivu-menu-submenu-title');
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
console.log('5. 点击菜单项...');
|
||||
const updatedMenuItemCount = await page.locator('.ivu-menu-item').count();
|
||||
console.log(` 展开后菜单项数量: ${updatedMenuItemCount}`);
|
||||
|
||||
if (updatedMenuItemCount > 0) {
|
||||
console.log('6. 点击第一个菜单项...');
|
||||
await page.click('.ivu-menu-item');
|
||||
await page.waitForTimeout(3000);
|
||||
console.log(' 已点击菜单项,等待响应...');
|
||||
|
||||
// 检查tab变化
|
||||
const tabCount = await page.locator('.tag-nav-item').count();
|
||||
console.log(` 当前tab数量: ${tabCount}`);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('测试失败:', error);
|
||||
}
|
||||
|
||||
console.log('保持浏览器打开10秒...');
|
||||
await page.waitForTimeout(10000);
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
detailedTest();
|
||||
Reference in New Issue
Block a user