@tshifhiwa/ohrm-ui-automation-framework
Version:
Playwright and TypeScript–based test automation framework for validating core UI features and workflows of the OrangeHRM demo application.
23 lines (18 loc) • 773 B
text/typescript
import { SyncFileManager } from "../../../fileManager/syncFileManager.js";
import { AUTH_FILE_CONFIG } from "./authentication.constants.js";
export default class AuthenticationPathResolver {
public static getCIFilePath(): string {
return SyncFileManager.join(this.getRootDir(), AUTH_FILE_CONFIG.CI_AUTH_FILE);
}
public static getLocalFilePath(): string {
return SyncFileManager.join(this.getRootDir(), AUTH_FILE_CONFIG.LOCAL_AUTH_FILE);
}
public static getEmptyAuthState(): string {
return AUTH_FILE_CONFIG.EMPTY_AUTH_STATE;
}
private static getRootDir(): string {
const rootDir = SyncFileManager.resolve(AUTH_FILE_CONFIG.ROOT_DIRECTORY);
SyncFileManager.ensureDirectoryExists(rootDir);
return rootDir;
}
}