@dev-blinq/cucumber_client 1.0.1719-dev → 1.0.1721-dev
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.
|
@@ -860,7 +860,11 @@ const generateCode = (recording, codePage, userData, projectDir, methodName) =>
|
|
|
860
860
|
locatorsMetadata,
|
|
861
861
|
};
|
|
862
862
|
};
|
|
863
|
-
const generatePageName = (url) => {
|
|
863
|
+
const generatePageName = (url, isUtilStep) => {
|
|
864
|
+
if (isUtilStep) {
|
|
865
|
+
return "renamed_util";
|
|
866
|
+
}
|
|
867
|
+
|
|
864
868
|
try {
|
|
865
869
|
let pathname = url;
|
|
866
870
|
try {
|
|
@@ -335,7 +335,7 @@ export class BVTStepRunner {
|
|
|
335
335
|
step.isUtilStep ||
|
|
336
336
|
((!(step.isImplemented && !step.shouldOverride) || step.shouldMakeStepTextUnique) && step.commands.length > 0)
|
|
337
337
|
) {
|
|
338
|
-
const pageName = generatePageName(step.startFrame?.url ?? "default");
|
|
338
|
+
const pageName = generatePageName(step.startFrame?.url ?? "default", step.isUtilStep);
|
|
339
339
|
const stepDefinitionFolderPath = path.join(tempFolderPath, "step_definitions");
|
|
340
340
|
if (!existsSync(stepDefinitionFolderPath)) {
|
|
341
341
|
mkdirSync(stepDefinitionFolderPath, { recursive: true });
|
|
@@ -487,7 +487,7 @@ function makeStepTextUnique(step, stepsDefinitions) {
|
|
|
487
487
|
// console.log({ stepDef });
|
|
488
488
|
if (
|
|
489
489
|
stepDef &&
|
|
490
|
-
(stepDef?.file.endsWith("utils.mjs") || stepDef?.file.endsWith("
|
|
490
|
+
(stepDef?.file.endsWith("utils.mjs") || stepDef?.file.endsWith("renamed_util.mjs")) &&
|
|
491
491
|
!step.shouldMakeStepTextUnique
|
|
492
492
|
) {
|
|
493
493
|
return true;
|
|
@@ -550,7 +550,7 @@ export async function saveRecording({
|
|
|
550
550
|
|
|
551
551
|
if (isUtilStep) {
|
|
552
552
|
isChangedUtilStepName =
|
|
553
|
-
step.renamedText && stepsDefinitions.findMatchingStep(step.renamedText)?.file.endsWith("
|
|
553
|
+
step.renamedText && stepsDefinitions.findMatchingStep(step.renamedText)?.file.endsWith("renamed_util.mjs");
|
|
554
554
|
|
|
555
555
|
if (!isChangedUtilStepName) {
|
|
556
556
|
const isUtilStep = stepsDefinitions.findMatchingStep(step.text)?.file.endsWith("utils.mjs");
|
|
@@ -788,7 +788,7 @@ export const getCommandsForImplementedStep = (stepName, stepsDefinitions, stepPa
|
|
|
788
788
|
if (error) {
|
|
789
789
|
throw new Error(error);
|
|
790
790
|
}
|
|
791
|
-
isUtilStep = codePage.sourceFileName.endsWith("utils.mjs") || codePage.sourceFileName.endsWith("
|
|
791
|
+
isUtilStep = codePage.sourceFileName.endsWith("utils.mjs") || codePage.sourceFileName.endsWith("renamed_util.mjs");
|
|
792
792
|
|
|
793
793
|
if (parametersNames.length !== stepParams.length) {
|
|
794
794
|
// console.log("Parameters mismatch", parametersNames, stepParams);
|
|
@@ -924,7 +924,7 @@ export async function updateStepDefinitions({ scenario, featureName, projectDir,
|
|
|
924
924
|
continue;
|
|
925
925
|
}
|
|
926
926
|
const cucumberStep = getCucumberStep({ step });
|
|
927
|
-
const pageName = generatePageName(step.startFrame?.url ?? "default");
|
|
927
|
+
const pageName = generatePageName(step.startFrame?.url ?? "default", step.isUtilStep);
|
|
928
928
|
const stepDefsFilePath = locateDefinitionPath(featureFolder, pageName);
|
|
929
929
|
let codePage = getCodePage(stepDefsFilePath);
|
|
930
930
|
codePage = await saveRecording({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-blinq/cucumber_client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1721-dev",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@cucumber/tag-expressions": "^6.1.1",
|
|
42
42
|
"@dev-blinq/cucumber-js": "1.0.220-dev",
|
|
43
43
|
"@faker-js/faker": "^8.4.1",
|
|
44
|
-
"automation_model": "1.0.
|
|
44
|
+
"automation_model": "1.0.928-dev",
|
|
45
45
|
"axios": "^1.7.4",
|
|
46
46
|
"chokidar": "^3.6.0",
|
|
47
47
|
"create-require": "^1.1.1",
|