@sridharkikkeri/playwright-common 1.0.41 ā 1.0.43
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/create-healthedge-tests.js +36 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
307
|
+
// Copy framework source files from package
|
|
308
|
+
const frameworkSrc = path.join(__dirname, 'src', 'core');
|
|
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, 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.
|
|
3
|
+
"version": "1.0.43",
|
|
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",
|