cbrowser 7.4.14 → 7.4.15

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/cli.js CHANGED
@@ -67,10 +67,13 @@ NATURAL LANGUAGE TEST SUITES (v6.1.0)
67
67
  --output <file> Save JSON report to file
68
68
  --html Generate HTML report
69
69
  --timeout <ms> Timeout per step (default: 30000)
70
+ --dry-run Parse and display test steps without executing
71
+ --fuzzy-match Use case-insensitive fuzzy matching for assertions
70
72
  test-suite --inline "..." Run inline test (semicolon-separated steps)
71
73
  Examples:
72
74
  cbrowser test-suite login-flow.txt --html
73
75
  cbrowser test-suite --inline "go to https://example.com ; click login ; verify url contains /dashboard"
76
+ cbrowser test-suite login-flow.txt --dry-run
74
77
 
75
78
  Test File Format:
76
79
  # Test: Login Flow
@@ -3332,6 +3335,8 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
3332
3335
  console.error(" --output <file> Save JSON report to file");
3333
3336
  console.error(" --html Generate HTML report");
3334
3337
  console.error(" --timeout <ms> Timeout per step (default: 30000)");
3338
+ console.error(" --dry-run Parse and display test steps without executing");
3339
+ console.error(" --fuzzy-match Case-insensitive fuzzy matching for assertions");
3335
3340
  console.error("");
3336
3341
  console.error("Test File Format:");
3337
3342
  console.error(" # Test: Login Flow");
@@ -3366,11 +3371,27 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
3366
3371
  for (const test of suite.tests) {
3367
3372
  console.log(` - ${test.name}: ${test.steps.length} steps`);
3368
3373
  }
3374
+ // Dry-run mode: parse and display without executing
3375
+ if (options["dry-run"]) {
3376
+ const dryResult = (0, index_js_2.dryRunNLTestSuite)(suite);
3377
+ console.log(`\nšŸ” DRY RUN - Parsed steps (no execution):\n`);
3378
+ for (const test of dryResult.tests) {
3379
+ console.log(` šŸ“‹ ${test.name}`);
3380
+ for (let i = 0; i < test.steps.length; i++) {
3381
+ const step = test.steps[i];
3382
+ const parsed = `[${step.action}${step.target ? `: ${step.target}` : ""}${step.value ? ` = "${step.value}"` : ""}]`;
3383
+ console.log(` ${i + 1}. ${step.instruction} ${parsed}`);
3384
+ }
3385
+ console.log("");
3386
+ }
3387
+ break;
3388
+ }
3369
3389
  const suiteOptions = {
3370
3390
  stepTimeout: options.timeout ? parseInt(options.timeout) : 30000,
3371
3391
  continueOnFailure: options["continue-on-failure"] === true,
3372
3392
  screenshotOnFailure: options["screenshot-on-failure"] !== false,
3373
3393
  headless,
3394
+ fuzzyMatch: options["fuzzy-match"] === true,
3374
3395
  };
3375
3396
  const result = await (0, index_js_2.runNLTestSuite)(suite, suiteOptions);
3376
3397
  // Print formatted report