This repository has been archived on 2025-04-22. You can view files and clone it, but cannot push or open issues or pull requests.
hlk_autotest/tests/common/auth.ts
LingandRX 3547f32493 ci(gitlab): 添加 GitLab CI 配置并更新测试相关代码
- 新增 .gitlab-ci.yml 文件,配置 GitLab CI/CD 管道
- 移除 AuthAccount 类中未使用的 indexedDBFile 属性
- 简化 baseFixture 中的测试初始化流程
- 更新 CustomerPage 中的顾客创建逻辑
- 调整 boss_cashier.spec.ts 中的二维码解码和输入值设置
- 新增 boss_test.spec.ts 文件,添加创建顾客的测试用例
2025-03-12 00:22:22 +08:00

34 lines
838 B
TypeScript

import { getEnvVar } from '@/utils/envUtils';
import { readFileSync } from 'fs';
const authConfig = {
authFilePath: '.auth/',
indexedDBFilePath: '.auth/',
};
class AuthAccount {
account: string;
password: string;
authFile: string;
constructor(account: string, password: string, authFile: string) {
this.account = account;
this.password = password;
this.authFile = authFile;
}
}
const firstAccount = new AuthAccount(
getEnvVar('boss_account'),
getEnvVar('boss_password'),
`${authConfig.authFilePath}${getEnvVar('boss_account')}.json`,
);
const secondAccount = new AuthAccount(
getEnvVar('boss_account_2'),
getEnvVar('boss_password_2'),
`${authConfig.authFilePath}${getEnvVar('boss_account_2')}.json`,
);
export { firstAccount, secondAccount, AuthAccount };