@testivai/witness-playwright 0.1.8 → 0.1.10

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.
@@ -119,7 +119,12 @@ function mergeTestConfig(projectConfig, testConfig) {
119
119
  ...projectConfig.ai,
120
120
  ...testConfig.ai
121
121
  },
122
- selectors: testConfig.selectors
122
+ performance: {
123
+ ...projectConfig.performance,
124
+ ...testConfig.performance
125
+ },
126
+ selectors: testConfig.selectors,
127
+ useCDP: testConfig.useCDP
123
128
  };
124
129
  }
125
130
  /**
package/dist/snapshot.js CHANGED
@@ -75,6 +75,14 @@ async function snapshot(page, testInfo, name, config) {
75
75
  // Load project configuration and merge with test-specific overrides
76
76
  const projectConfig = await (0, loader_1.loadConfig)();
77
77
  const effectiveConfig = (0, loader_1.mergeTestConfig)(projectConfig, config);
78
+ // Debug: Log config
79
+ if (process.env.TESTIVAI_DEBUG === 'true') {
80
+ console.log('[TestivAI] Config:', {
81
+ projectConfig,
82
+ testConfig: config,
83
+ effectiveConfig
84
+ });
85
+ }
78
86
  const outputDir = path.join(process.cwd(), '.testivai', 'temp');
79
87
  await fs.ensureDir(outputDir);
80
88
  const snapshotName = name || getSnapshotNameFromUrl(page.url());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testivai/witness-playwright",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Playwright sensor for Testivai Visual Regression Test system",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -90,7 +90,12 @@ export function mergeTestConfig(
90
90
  ...projectConfig.ai,
91
91
  ...testConfig.ai
92
92
  },
93
- selectors: testConfig.selectors
93
+ performance: {
94
+ ...projectConfig.performance,
95
+ ...testConfig.performance
96
+ },
97
+ selectors: testConfig.selectors,
98
+ useCDP: testConfig.useCDP
94
99
  };
95
100
  }
96
101
 
package/src/snapshot.ts CHANGED
@@ -46,6 +46,15 @@ export async function snapshot(
46
46
  const projectConfig = await loadConfig();
47
47
  const effectiveConfig = mergeTestConfig(projectConfig, config);
48
48
 
49
+ // Debug: Log config
50
+ if (process.env.TESTIVAI_DEBUG === 'true') {
51
+ console.log('[TestivAI] Config:', {
52
+ projectConfig,
53
+ testConfig: config,
54
+ effectiveConfig
55
+ });
56
+ }
57
+
49
58
  const outputDir = path.join(process.cwd(), '.testivai', 'temp');
50
59
  await fs.ensureDir(outputDir);
51
60