UNPKG

@uuv/runner-commons

Version:
50 lines (49 loc) 1.77 kB
/** * Software Name : UUV * * SPDX-License-Identifier: MIT * * This software is distributed under the MIT License, * see the "LICENSE" file for more details * * Authors: NJAKO MOLOM Louis Fredice & SERVICAL Stanley * Software description: Make test writing fast, understandable by any human * understanding English or French. */ import fs from "fs"; import { AccessibleRole } from "./accessible-role"; export { fs }; export declare abstract class GenerateFileProcessing { baseDir: string; stepDefinitionFile: string; generatedDir: string; wordingFilePath: string; constructor(baseDir: string, runner: TEST_RUNNER_ENUM, stepDefinitionFileName: STEP_DEFINITION_FILE_NAME, wordingFileRelativePath: any); abstract runGenerate(): void; abstract generateWordingFiles(generatedFile: string, lang: string): any; abstract computeWordingFile(data: string, wordingFile: string, roles?: AccessibleRole[], generatedFile?: string): any; } export declare function getDefinedRoles(lang: string): AccessibleRole[]; export declare enum TEST_RUNNER_ENUM { CYPRESS = "cypress", PLAYWRIGHT = "playwright" } export declare enum STEP_DEFINITION_FILE_NAME { BASE = "base-check-engine", BY_ROLE = "based-role-check-engine" } export declare enum KEY_PRESS { TAB = "{tab}", REVERSE_TAB = "{reverseTab}", UP = "{up}", DOWN = "{down}", LEFT = "{left}", RIGHT = "{right}" } export declare class Common { static buildDirIfNotExists(directory: string): void; static cleanGeneratedFilesIfExists(generatedFile: string): void; static cleanFolderIfExists(folder: string): void; static writeWordingFile(generatedFile: string, data: string): void; static deleteAllFileOfDirectory(dirPath: any): void; }