@sridharkikkeri/playwright-common 1.0.43 → 1.0.45
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 +24 -3
- package/package.json +1 -1
|
@@ -61,12 +61,16 @@ const packageJson = {
|
|
|
61
61
|
'test:auto': 'TEST_ENV=auto playwright test',
|
|
62
62
|
'test:staging': 'TEST_ENV=staging playwright test',
|
|
63
63
|
'test:prod': 'TEST_ENV=prod playwright test',
|
|
64
|
+
'test:headed': 'playwright test --headed',
|
|
65
|
+
'test:debug': 'playwright test --debug',
|
|
66
|
+
'test:ui': 'playwright test --ui',
|
|
67
|
+
'codegen': 'playwright codegen',
|
|
68
|
+
'show-report': 'playwright show-report',
|
|
64
69
|
'report': 'allure generate allure-results --clean -o allure-report && allure open allure-report',
|
|
65
70
|
'lint': 'eslint .',
|
|
66
71
|
'lint:fix': 'eslint . --fix'
|
|
67
72
|
},
|
|
68
73
|
dependencies: {
|
|
69
|
-
'@sridharkikkeri/playwright-common': 'latest',
|
|
70
74
|
'@playwright/test': '^1.42.0',
|
|
71
75
|
'allure-playwright': '^3.4.5'
|
|
72
76
|
},
|
|
@@ -158,7 +162,7 @@ Object.entries(envConfigs).forEach(([env, config]) => {
|
|
|
158
162
|
|
|
159
163
|
// Sample Page Object
|
|
160
164
|
const samplePage = `import { Page } from '@playwright/test';
|
|
161
|
-
import { BasePage } from '
|
|
165
|
+
import { BasePage } from '../pages/BasePage';
|
|
162
166
|
|
|
163
167
|
export class HomePage extends BasePage {
|
|
164
168
|
constructor(page: Page) {
|
|
@@ -178,7 +182,7 @@ export class HomePage extends BasePage {
|
|
|
178
182
|
fs.writeFileSync(path.join(projectPath, 'src/main/pages/HomePage.ts'), samplePage);
|
|
179
183
|
|
|
180
184
|
// Sample Test
|
|
181
|
-
const sampleTest = `import { test } from '
|
|
185
|
+
const sampleTest = `import { test } from '../../../main/fixtures/fixtures';
|
|
182
186
|
import { HomePage } from '../../main/pages/HomePage';
|
|
183
187
|
|
|
184
188
|
test.describe('Sample Tests', () => {
|
|
@@ -274,6 +278,16 @@ npm run test:dev
|
|
|
274
278
|
npm run report
|
|
275
279
|
\`\`\`
|
|
276
280
|
|
|
281
|
+
## Playwright CLI Commands
|
|
282
|
+
|
|
283
|
+
\`\`\`bash
|
|
284
|
+
npm run test:headed # Run tests in headed mode
|
|
285
|
+
npm run test:debug # Debug tests with Playwright Inspector
|
|
286
|
+
npm run test:ui # Run tests in UI mode
|
|
287
|
+
npm run codegen # Generate test code with Codegen
|
|
288
|
+
npm run show-report # Show HTML report
|
|
289
|
+
\`\`\`
|
|
290
|
+
|
|
277
291
|
## Environment-Specific Tests
|
|
278
292
|
|
|
279
293
|
\`\`\`bash
|
|
@@ -320,6 +334,13 @@ if (fs.existsSync(frameworkSrc)) {
|
|
|
320
334
|
}
|
|
321
335
|
});
|
|
322
336
|
|
|
337
|
+
// Also copy fixtures to src/main
|
|
338
|
+
const fixturesSrc = path.join(__dirname, 'src', 'fixtures');
|
|
339
|
+
if (fs.existsSync(fixturesSrc)) {
|
|
340
|
+
copyDir(fixturesSrc, path.join(projectPath, 'src', 'main', 'fixtures'));
|
|
341
|
+
console.log(` ✓ Copied fixtures`);
|
|
342
|
+
}
|
|
343
|
+
|
|
323
344
|
console.log('\n✅ Framework files copied');
|
|
324
345
|
}
|
|
325
346
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sridharkikkeri/playwright-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
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",
|