@testsmith/perfornium 0.6.2 → 0.6.4
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.
|
@@ -520,7 +520,10 @@ class StepExecutor {
|
|
|
520
520
|
const Module = require('module');
|
|
521
521
|
const tempModule = new Module(filePath);
|
|
522
522
|
tempModule.filename = filePath;
|
|
523
|
-
|
|
523
|
+
// Include both script dir and cwd node_modules for dependency resolution
|
|
524
|
+
const scriptPaths = Module._nodeModulePaths(path.dirname(filePath));
|
|
525
|
+
const cwdPaths = Module._nodeModulePaths(process.cwd());
|
|
526
|
+
tempModule.paths = [...new Set([...scriptPaths, ...cwdPaths])];
|
|
524
527
|
tempModule._compile(result.code, filePath);
|
|
525
528
|
module = tempModule.exports;
|
|
526
529
|
}
|
|
@@ -317,7 +317,8 @@ class PlaywrightToPerfornium {
|
|
|
317
317
|
case 'getByText':
|
|
318
318
|
return `text=${this.extractFirstArg(args)}`;
|
|
319
319
|
case 'getByLabel':
|
|
320
|
-
|
|
320
|
+
// Use text= instead of label= since getByLabel often matches non-label elements
|
|
321
|
+
return `text=${this.extractFirstArg(args)}`;
|
|
321
322
|
case 'getByPlaceholder':
|
|
322
323
|
return `placeholder=${this.extractFirstArg(args)}`;
|
|
323
324
|
case 'getByTestId':
|