@dev-blinq/cucumber_client 1.0.1463-stage → 1.0.1464-stage
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");
|
|
@@ -787,7 +787,7 @@ export const getCommandsForImplementedStep = (stepName, stepsDefinitions, stepPa
|
|
|
787
787
|
if (error) {
|
|
788
788
|
throw new Error(error);
|
|
789
789
|
}
|
|
790
|
-
isUtilStep = codePage.sourceFileName.endsWith("utils.mjs") || codePage.sourceFileName.endsWith("
|
|
790
|
+
isUtilStep = codePage.sourceFileName.endsWith("utils.mjs") || codePage.sourceFileName.endsWith("renamed_util.mjs");
|
|
791
791
|
|
|
792
792
|
if (parametersNames.length !== stepParams.length) {
|
|
793
793
|
// console.log("Parameters mismatch", parametersNames, stepParams);
|
|
@@ -923,7 +923,7 @@ export async function updateStepDefinitions({ scenario, featureName, projectDir,
|
|
|
923
923
|
continue;
|
|
924
924
|
}
|
|
925
925
|
const cucumberStep = getCucumberStep({ step });
|
|
926
|
-
const pageName = generatePageName(step.startFrame?.url ?? "default");
|
|
926
|
+
const pageName = generatePageName(step.startFrame?.url ?? "default", step.isUtilStep);
|
|
927
927
|
const stepDefsFilePath = locateDefinitionPath(featureFolder, pageName);
|
|
928
928
|
let codePage = getCodePage(stepDefsFilePath);
|
|
929
929
|
codePage = await saveRecording({
|