@dev-blinq/cucumber_client 1.0.1742-dev → 1.0.1744-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.
|
@@ -41,7 +41,7 @@ async function evaluate(frame, script) {
|
|
|
41
41
|
await evaluate(childFrame, script);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
async function findNestedFrameSelector(frame, obj
|
|
44
|
+
async function findNestedFrameSelector(frame, obj) {
|
|
45
45
|
try {
|
|
46
46
|
const parent = frame.parentFrame();
|
|
47
47
|
if (!parent)
|
|
@@ -49,10 +49,10 @@ async function findNestedFrameSelector(frame, obj = {}) {
|
|
|
49
49
|
const frameElement = await frame.frameElement();
|
|
50
50
|
if (!frameElement)
|
|
51
51
|
return;
|
|
52
|
-
const selectors = await
|
|
52
|
+
const selectors = await parent.evaluate((element) => {
|
|
53
53
|
const recorder = window.__bvt_Recorder;
|
|
54
54
|
return recorder.locatorGenerator.getElementLocators(element, { excludeText: true }).locators;
|
|
55
|
-
});
|
|
55
|
+
}, frameElement);
|
|
56
56
|
return findNestedFrameSelector(parent, { children: obj, selectors });
|
|
57
57
|
}
|
|
58
58
|
catch (e) {
|
|
@@ -773,11 +773,11 @@ export class BVTRecorder {
|
|
|
773
773
|
const contextElement = document.querySelector(`[data-blinq-context-id="${contextId}"]`);
|
|
774
774
|
const el = document.querySelector(`[data-blinq-id="${id}"]`);
|
|
775
775
|
if (!recorder || !el) {
|
|
776
|
-
return { locators: []
|
|
776
|
+
return { locators: [] };
|
|
777
777
|
}
|
|
778
778
|
if (contextElement && recorder.locatorGenerator.toContextLocators) {
|
|
779
779
|
const result = recorder.locatorGenerator.toContextLocators(el, contextElement);
|
|
780
|
-
return result ?? { locators: []
|
|
780
|
+
return result ?? { locators: [] };
|
|
781
781
|
}
|
|
782
782
|
const isRecordingText = mode === "recordingText";
|
|
783
783
|
return recorder.locatorGenerator.getElementLocators(el, {
|
|
@@ -28,15 +28,12 @@ export function handleFileInitOps(projectDir, logger) {
|
|
|
28
28
|
FIXED_FOLDER_NAMES.STEP_DEFINITIONS,
|
|
29
29
|
FIXED_FILE_NAMES.UTILS
|
|
30
30
|
);
|
|
31
|
-
console.log("🍊", __dirname, "🍎", process.cwd());
|
|
32
31
|
const utilsTemplateFilePath = path.join(
|
|
33
32
|
__dirname,
|
|
34
33
|
`../../${FIXED_FOLDER_NAMES.ASSETS}`,
|
|
35
34
|
FIXED_FOLDER_NAMES.TEMPLATES,
|
|
36
35
|
FIXED_FILE_NAMES.UTILS_TEMPLATE
|
|
37
36
|
);
|
|
38
|
-
logger.info("🔆 utilsTemplateFilePath:", utilsTemplateFilePath);
|
|
39
|
-
logger.info("☀️ exists:", existsSync(utilsTemplateFilePath));
|
|
40
37
|
|
|
41
38
|
if (!existsSync(utilsTemplateFilePath)) {
|
|
42
39
|
throw new Error(`Utils template not found at: ${utilsTemplateFilePath}`);
|
|
@@ -61,18 +58,6 @@ export function handleFileInitOps(projectDir, logger) {
|
|
|
61
58
|
|
|
62
59
|
return { featureFolder, utilsFilePath, utilsContent };
|
|
63
60
|
} catch (error) {
|
|
64
|
-
console.log(
|
|
65
|
-
"🔰🔰🔰🔰🔰🔰",
|
|
66
|
-
JSON.stringify(
|
|
67
|
-
{
|
|
68
|
-
type: SaveJobErrorType.FILE_SYSTEM_ERROR,
|
|
69
|
-
message: "❌ Failed to initialize step definition folder structure",
|
|
70
|
-
meta: { reason: getErrorMessage(error) },
|
|
71
|
-
},
|
|
72
|
-
null,
|
|
73
|
-
2
|
|
74
|
-
)
|
|
75
|
-
);
|
|
76
61
|
throw new UpdateStepDefinitionsError({
|
|
77
62
|
type: SaveJobErrorType.FILE_SYSTEM_ERROR,
|
|
78
63
|
message: "❌ Failed to initialize step definition folder structure",
|