///
declare namespace Cypress {
interface Chainable {
/**
* 自定义命令:登录并完成初始化进入主页
*
* 这个命令封装了完整的登录流程:
* 1. 清除存储
* 2. Mock 所有必要的 API(i18n、quota、patient types、body parts)
* 3. 执行登录
* 4. 等待初始化完成
*
* @param username - 用户名,默认 'admin'
* @param password - 密码,默认 '123456'
*
* @example
* cy.loginAndInitialize();
* cy.loginAndInitialize('testuser', 'testpass');
*/
loginAndInitialize(username?: string, password?: string): Chainable;
/**
* 记录带时间戳的日志
*
* @param message - 日志消息
* @param args - 额外参数
*/
logWithDate(message: string, ...args: any[]): Chainable;
/**
* 刷新浏览器 console 日志到终端
*
* 将缓冲区中的所有浏览器 console 日志输出到运行 Cypress 的终端
*
* @example
* cy.flushConsoleLogs();
*/
flushConsoleLogs(): Chainable;
}
interface AUTWindow {
__consoleLogs__?: Array<{
type: 'log' | 'error' | 'warn';
message: string;
timestamp: string;
}>;
}
}
export {};