@sridharkikkeri/playwright-common 1.0.42 → 1.0.44

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.
@@ -66,7 +66,6 @@ const packageJson = {
66
66
  'lint:fix': 'eslint . --fix'
67
67
  },
68
68
  dependencies: {
69
- '@sridharkikkeri/playwright-common': 'latest',
70
69
  '@playwright/test': '^1.42.0',
71
70
  'allure-playwright': '^3.4.5'
72
71
  },
@@ -158,7 +157,7 @@ Object.entries(envConfigs).forEach(([env, config]) => {
158
157
 
159
158
  // Sample Page Object
160
159
  const samplePage = `import { Page } from '@playwright/test';
161
- import { BasePage } from '@sridharkikkeri/playwright-common';
160
+ import { BasePage } from '../pages/BasePage';
162
161
 
163
162
  export class HomePage extends BasePage {
164
163
  constructor(page: Page) {
@@ -178,7 +177,7 @@ export class HomePage extends BasePage {
178
177
  fs.writeFileSync(path.join(projectPath, 'src/main/pages/HomePage.ts'), samplePage);
179
178
 
180
179
  // Sample Test
181
- const sampleTest = `import { test } from '@sridharkikkeri/playwright-common';
180
+ const sampleTest = `import { test } from '../../../main/fixtures/fixtures';
182
181
  import { HomePage } from '../../main/pages/HomePage';
183
182
 
184
183
  test.describe('Sample Tests', () => {
@@ -305,14 +304,14 @@ npm run test:prod # Uses config/prod.json
305
304
  fs.writeFileSync(path.join(projectPath, 'README.md'), readme);
306
305
 
307
306
  // Copy framework source files from package
308
- const frameworkSrc = path.join(__dirname, 'src', 'com', 'healthedge', 'common');
307
+ const frameworkSrc = path.join(__dirname, 'src', 'core');
309
308
  if (fs.existsSync(frameworkSrc)) {
310
309
  console.log('\nšŸ“‹ Copying framework source files...\n');
311
310
 
312
311
  // Copy core modules to src/main/
313
312
  const modules = ['api', 'config', 'fixtures', 'i18n', 'pages', 'reporting', 'selfhealing', 'utils', 'visual', 'wrappers'];
314
313
  modules.forEach(module => {
315
- const src = path.join(frameworkSrc, 'core', module);
314
+ const src = path.join(frameworkSrc, module);
316
315
  const dest = path.join(projectPath, 'src', 'main', module);
317
316
  if (fs.existsSync(src)) {
318
317
  copyDir(src, dest);
@@ -320,6 +319,13 @@ if (fs.existsSync(frameworkSrc)) {
320
319
  }
321
320
  });
322
321
 
322
+ // Also copy fixtures to src/main
323
+ const fixturesSrc = path.join(__dirname, 'src', 'fixtures');
324
+ if (fs.existsSync(fixturesSrc)) {
325
+ copyDir(fixturesSrc, path.join(projectPath, 'src', 'main', 'fixtures'));
326
+ console.log(` āœ“ Copied fixtures`);
327
+ }
328
+
323
329
  console.log('\nāœ… Framework files copied');
324
330
  }
325
331
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sridharkikkeri/playwright-common",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
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",