// #!/usr/bin/env node // // /** // * 龙蛟IBP系统测试运行脚本 // */ // const {execSync} = require('child_process'); // const chalk = require('chalk'); // // console.log(chalk.blue('开始运行龙蛟IBP系统测试...')); // // // 默认运行最简单的测试 // const testFile = process.argv[2] || 'tests/longi-ibp/simple-login.test.js'; // // // 构建命令 - 使用--project而不是--browser // const command = `npx playwright test ${testFile} --headed --project=chromium`; // // console.log(chalk.yellow(`运行命令: ${command}`)); // // try { // // 执行命令 // execSync(command, {stdio: 'inherit'}); // console.log(chalk.green('测试完成!')); // } catch (error) { // console.error(chalk.red('测试执行失败:'), error.message); // process.exit(1); // }