@sridharkikkeri/playwright-common 1.0.41 → 1.0.42

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.
@@ -9,6 +9,22 @@ const projectPath = path.join(process.cwd(), projectName);
9
9
 
10
10
  console.log(`\nšŸš€ Creating HealthEdge Playwright project: ${projectName}\n`);
11
11
 
12
+ // Helper to copy directory recursively
13
+ function copyDir(src, dest) {
14
+ if (!fs.existsSync(src)) return;
15
+ fs.mkdirSync(dest, { recursive: true });
16
+ const entries = fs.readdirSync(src, { withFileTypes: true });
17
+ for (const entry of entries) {
18
+ const srcPath = path.join(src, entry.name);
19
+ const destPath = path.join(dest, entry.name);
20
+ if (entry.isDirectory()) {
21
+ copyDir(srcPath, destPath);
22
+ } else {
23
+ fs.copyFileSync(srcPath, destPath);
24
+ }
25
+ }
26
+ }
27
+
12
28
  // Create project structure matching smokeTest
13
29
  const dirs = [
14
30
  'src/main/pages',
@@ -288,7 +304,26 @@ npm run test:prod # Uses config/prod.json
288
304
 
289
305
  fs.writeFileSync(path.join(projectPath, 'README.md'), readme);
290
306
 
291
- console.log('āœ… Project structure created');
307
+ // Copy framework source files from package
308
+ const frameworkSrc = path.join(__dirname, 'src', 'com', 'healthedge', 'common');
309
+ if (fs.existsSync(frameworkSrc)) {
310
+ console.log('\nšŸ“‹ Copying framework source files...\n');
311
+
312
+ // Copy core modules to src/main/
313
+ const modules = ['api', 'config', 'fixtures', 'i18n', 'pages', 'reporting', 'selfhealing', 'utils', 'visual', 'wrappers'];
314
+ modules.forEach(module => {
315
+ const src = path.join(frameworkSrc, 'core', module);
316
+ const dest = path.join(projectPath, 'src', 'main', module);
317
+ if (fs.existsSync(src)) {
318
+ copyDir(src, dest);
319
+ console.log(` āœ“ Copied ${module}`);
320
+ }
321
+ });
322
+
323
+ console.log('\nāœ… Framework files copied');
324
+ }
325
+
326
+ console.log('\nāœ… Project structure created');
292
327
  console.log('\nšŸ“¦ Installing dependencies...\n');
293
328
 
294
329
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sridharkikkeri/playwright-common",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Production-grade Playwright framework with AI-powered self-healing, visual regression, and enterprise features",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",