@uuv/playwright 2.7.2 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -71,48 +71,6 @@ async function bddGen(tempDir, env) {
|
|
|
71
71
|
process.exit(-1);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function translateFeatures(tempDir, configDir) {
|
|
75
|
-
const FEATURE_DIR = `${tempDir}/${configDir !== "." ? configDir + "/e2e" : "e2e"}`;
|
|
76
|
-
const filenames = fs_1.default.readdirSync(FEATURE_DIR, { encoding: "utf8" });
|
|
77
|
-
filenames.forEach(file => {
|
|
78
|
-
const generatedFile = `${FEATURE_DIR}/${file}`;
|
|
79
|
-
let data = fs_1.default.readFileSync(generatedFile, { encoding: "utf8" });
|
|
80
|
-
data = data
|
|
81
|
-
.replaceAll("Soit", "Given")
|
|
82
|
-
.replaceAll("Sachant que", "Given")
|
|
83
|
-
.replaceAll("Sachant qu'", "Given")
|
|
84
|
-
.replaceAll("Sachant", "Given")
|
|
85
|
-
.replaceAll("Etant donné que", "Given")
|
|
86
|
-
.replaceAll("Étant donné que", "Given")
|
|
87
|
-
.replaceAll("Étant donné qu'", "Given")
|
|
88
|
-
.replaceAll("Etant donné qu'", "Given")
|
|
89
|
-
.replaceAll("Etant données", "Given")
|
|
90
|
-
.replaceAll("Étant données", "Given")
|
|
91
|
-
.replaceAll("Etant donnés", "Given")
|
|
92
|
-
.replaceAll("Étant donnés", "Given")
|
|
93
|
-
.replaceAll("Etant donnée", "Given")
|
|
94
|
-
.replaceAll("Étant donnée", "Given")
|
|
95
|
-
.replaceAll("Etant donné", "Given")
|
|
96
|
-
.replaceAll("Étant donné", "Given")
|
|
97
|
-
.replaceAll("Quand", "When")
|
|
98
|
-
.replaceAll("Lorsque", "When")
|
|
99
|
-
.replaceAll("Lorsqu'", "When")
|
|
100
|
-
.replaceAll("Alors", "Then")
|
|
101
|
-
.replaceAll("Donc", "Then")
|
|
102
|
-
.replaceAll("Et que", "And")
|
|
103
|
-
.replaceAll("Et qu'", "And")
|
|
104
|
-
.replaceAll("Et", "And")
|
|
105
|
-
.replaceAll("Mais que", "But")
|
|
106
|
-
.replaceAll("Mais qu'", "But")
|
|
107
|
-
.replaceAll("Mais", "But");
|
|
108
|
-
data = "/*******************************\n" +
|
|
109
|
-
"NE PAS MODIFIER, FICHIER GENERE\n" +
|
|
110
|
-
"*******************************/\n\n" +
|
|
111
|
-
data;
|
|
112
|
-
fs_1.default.writeFileSync(generatedFile, data);
|
|
113
|
-
console.log(chalk_1.default.gray(`[WRITE] ${generatedFile} written successfully`));
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
74
|
function runPlaywright(mode, configDir, browser = "chromium", generateHtmlReport = false, generateJunitReport = false, env, targetTestFile) {
|
|
117
75
|
const configFile = `${configDir}/playwright.config.ts`;
|
|
118
76
|
const reportType = generateHtmlReport ? uuv_playwright_reporter_helper_1.GeneratedReportType.HTML : uuv_playwright_reporter_helper_1.GeneratedReportType.CONSOLE;
|
|
@@ -156,7 +114,6 @@ function getTargetTestFileForPlawright(targetTestFile) {
|
|
|
156
114
|
async function executePreprocessor(tempDir, configDir, env) {
|
|
157
115
|
console.log("running preprocessor...");
|
|
158
116
|
await bddGen(tempDir, env);
|
|
159
|
-
translateFeatures(tempDir, configDir);
|
|
160
117
|
console.log("preprocessor executed");
|
|
161
118
|
}
|
|
162
119
|
exports.executePreprocessor = executePreprocessor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/playwright",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
6
|
"description": "A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and playwright",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@cucumber/cucumber": "9.6.0",
|
|
45
45
|
"@cucumber/tag-expressions": "^6.0.0",
|
|
46
46
|
"@playwright/test": "1.42.1",
|
|
47
|
-
"@uuv/runner-commons": "2.
|
|
47
|
+
"@uuv/runner-commons": "2.8.1",
|
|
48
48
|
"axe-core": "4.8.4",
|
|
49
|
-
"axe-playwright": "
|
|
49
|
+
"axe-playwright": "2.0.1",
|
|
50
50
|
"chalk": "4.1.2",
|
|
51
51
|
"chalk-table": "^1.0.2",
|
|
52
52
|
"chokidar": "3.5.3",
|