@sridharkikkeri/playwright-common 1.0.30 → 1.0.31

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.
@@ -26,8 +26,7 @@ function copyRecursiveSync(src, dest) {
26
26
  // 1. Create Clean Directory Structure
27
27
  const baseDirs = [
28
28
  'src/core',
29
- 'src/pages',
30
- 'src/tests',
29
+ 'src/tests/pages',
31
30
  'src/fixtures',
32
31
  'src/i18n',
33
32
  'src/utils',
@@ -51,12 +50,39 @@ if (fs.existsSync(frameworkSrc)) {
51
50
  console.log('šŸ“„ Copying framework source logic...');
52
51
  copyRecursiveSync(path.join(frameworkSrc, 'core'), path.join(projectPath, 'src/core'));
53
52
  copyRecursiveSync(path.join(frameworkSrc, 'fixtures'), path.join(projectPath, 'src/fixtures'));
53
+
54
+ // Mapping quality/pages to tests/pages as requested
54
55
  if (fs.existsSync(path.join(frameworkSrc, 'quality/pages'))) {
56
+ console.log('šŸ“„ Copying quality pages to src/tests/pages...');
55
57
  copyRecursiveSync(path.join(frameworkSrc, 'quality/pages'), path.join(projectPath, 'src/tests/pages'));
56
58
  }
59
+
60
+ // Copy Sample Tests
61
+ if (fs.existsSync(path.join(frameworkSrc, 'tests'))) {
62
+ copyRecursiveSync(path.join(frameworkSrc, 'tests'), path.join(projectPath, 'src/tests'));
63
+ }
64
+ }
65
+
66
+ // Copy Documentation Portal
67
+ if (fs.existsSync(frameworkApiDocs)) {
68
+ console.log('šŸ“š Copying enterprise API documentation...');
69
+ copyRecursiveSync(frameworkApiDocs, path.join(projectPath, 'api-docs'));
57
70
  }
58
71
 
59
- // ... (Documentation transfer logic) ...
72
+ // Copy Core Strategy Documents
73
+ const strategyFiles = [
74
+ 'HEALING_CACHE_STRATEGY.md',
75
+ 'VISUAL_TESTING.md',
76
+ 'README.md'
77
+ ];
78
+
79
+ strategyFiles.forEach(file => {
80
+ const src = path.join(frameworkRootDir, file);
81
+ if (fs.existsSync(src)) {
82
+ console.log(`šŸ“Ž Including ${file}...`);
83
+ fs.copyFileSync(src, path.join(projectPath, file));
84
+ }
85
+ });
60
86
 
61
87
  // 3. Project Configuration
62
88
  const packageJson = {
@@ -69,7 +95,7 @@ const packageJson = {
69
95
  'lint': 'eslint . --ext .ts'
70
96
  },
71
97
  dependencies: {
72
- '@sridharkikkeri/playwright-common': '^1.0.30',
98
+ '@sridharkikkeri/playwright-common': '^1.0.31',
73
99
  '@playwright/test': '^1.42.0',
74
100
  'allure-playwright': '^3.4.5'
75
101
  },
@@ -82,14 +108,8 @@ const packageJson = {
82
108
  };
83
109
  fs.writeFileSync(path.join(projectPath, 'package.json'), JSON.stringify(packageJson, null, 2));
84
110
 
85
- // Single Framework Config (Strict Rule)
86
- const config = {
87
- healingEnabled: true,
88
- environment: 'dev',
89
- baseUrl: 'https://example.com',
90
- apiUrl: 'https://api.example.com',
91
- timeout: 30000
92
- };
111
+ // Single Framework Config
112
+ const config = { healingEnabled: true, environment: 'dev', baseUrl: 'https://example.com', apiUrl: 'https://api.example.com', timeout: 30000 };
93
113
  fs.writeFileSync(path.join(projectPath, 'framework.config.json'), JSON.stringify(config, null, 2));
94
114
 
95
115
  const playwrightConfig = `import { defineConfig } from '@playwright/test';
@@ -110,7 +130,7 @@ fs.writeFileSync(path.join(projectPath, 'tsconfig.json'), JSON.stringify(tsConfi
110
130
  const gitignore = `node_modules/\nallure-results/\nallure-report/\n.env\n*.log\n`;
111
131
  fs.writeFileSync(path.join(projectPath, '.gitignore'), gitignore);
112
132
 
113
- console.log('\nāœ… Enterprise Project Ready (Streamlined & Clean)');
133
+ console.log('\nāœ… Enterprise Project Created (Corrected Folder Mapping)');
114
134
  console.log('šŸ“¦ Installing dependencies...\n');
115
135
 
116
136
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sridharkikkeri/playwright-common",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
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",