- 新增 .gitlab-ci.yml 文件,配置 GitLab CI/CD 管道 - 移除 AuthAccount 类中未使用的 indexedDBFile 属性 - 简化 baseFixture 中的测试初始化流程 - 更新 CustomerPage 中的顾客创建逻辑 - 调整 boss_cashier.spec.ts 中的二维码解码和输入值设置 - 新增 boss_test.spec.ts 文件,添加创建顾客的测试用例
34 lines
838 B
TypeScript
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 }; |