@probolabs/playwright 1.4.0-rc.7 → 1.5.0-rc.2

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.
package/dist/index.d.ts CHANGED
@@ -381,6 +381,28 @@ declare class OTP {
381
381
  private static parseTimestamp;
382
382
  }
383
383
 
384
+ /**
385
+ * Builds the standard interpolation context for template literals.
386
+ * Merges params with additional context and includes process (when available)
387
+ * so that ${process.env.VAR_NAME} templates resolve correctly.
388
+ *
389
+ * @param params The primary context (e.g., parameter table row)
390
+ * @param additionalContext Optional extra context (e.g., extractedValues)
391
+ * @returns Context object suitable for interpolateTemplate
392
+ */
393
+ declare function buildInterpolationContext(params: Record<string, any>, additionalContext?: Record<string, any>): Record<string, any>;
394
+ /**
395
+ * Interpolates a string with params and optional additional context.
396
+ * Convenience wrapper that builds the standard context (including process for ${process.env.X})
397
+ * and calls interpolateTemplate.
398
+ *
399
+ * @param str The string containing template literal syntax (e.g., "${process.env.TOTP_SECRET}")
400
+ * @param params The primary context (e.g., parameter table row)
401
+ * @param additionalContext Optional extra context (e.g., extractedValues)
402
+ * @returns The interpolated string
403
+ */
404
+ declare function interpolateWithParams(str: string, params: Record<string, any>, additionalContext?: Record<string, any>): string;
405
+
384
406
  /**
385
407
  * Options for code generation
386
408
  */
@@ -633,5 +655,5 @@ declare class Probo {
633
655
  askAIHelper(page: Page, question: string, options: AskAIOptions, assertAnswer?: string): Promise<ServerResponse>;
634
656
  }
635
657
 
636
- export { Highlighter, NavTracker, OTP, Probo, ProboCodeGenerator, ProboPlaywright, TestSuiteRunner, findClosestVisibleElement };
658
+ export { Highlighter, NavTracker, OTP, Probo, ProboCodeGenerator, ProboPlaywright, TestSuiteRunner, buildInterpolationContext, findClosestVisibleElement, interpolateWithParams };
637
659
  export type { AskAIOptions, CodeGenOptions, ElementTagType, MailinatorMessage, RunStepOptions, TestStatistics, TestSuiteCodeGenResult, TestSuiteRunOptions, TestSuiteRunResult };