@sridharkikkeri/playwright-common 1.0.36 ā 1.0.37
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.
|
@@ -7,7 +7,7 @@ const { execSync } = require('child_process');
|
|
|
7
7
|
const projectName = process.argv[2] || 'my-healthedge-tests';
|
|
8
8
|
const projectPath = path.join(process.cwd(), projectName);
|
|
9
9
|
|
|
10
|
-
console.log(`\nš Creating HealthEdge Playwright project (v1.0.
|
|
10
|
+
console.log(`\nš Creating HealthEdge Playwright project (v1.0.37): ${projectName}\n`);
|
|
11
11
|
|
|
12
12
|
// Recursive Copy Helper
|
|
13
13
|
function copyRecursiveSync(src, dest) {
|
|
@@ -89,7 +89,7 @@ const packageJson = {
|
|
|
89
89
|
'lint': 'eslint . --ext .ts'
|
|
90
90
|
},
|
|
91
91
|
dependencies: {
|
|
92
|
-
'@sridharkikkeri/playwright-common': '^1.0.
|
|
92
|
+
'@sridharkikkeri/playwright-common': '^1.0.37',
|
|
93
93
|
'@playwright/test': '^1.42.0',
|
|
94
94
|
'allure-playwright': '^3.4.5'
|
|
95
95
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,2DAA2D;IAC3D,YAAY,EAAE,kBAAkB,CAAC;IACjC,wDAAwD;IACxD,SAAS,EAAE,SAAS,CAAC;IACrB,iCAAiC;IACjC,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,2DAA2D;IAC3D,YAAY,EAAE,kBAAkB,CAAC;IACjC,wDAAwD;IACxD,SAAS,EAAE,SAAS,CAAC;IACrB,iCAAiC;IACjC,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,qDAAqD;IACrD,cAAc,EAAE,IAAI,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI,iQAkEf,CAAC"}
|
|
@@ -46,20 +46,21 @@ exports.test = test_1.test.extend({
|
|
|
46
46
|
current: testInfo.retry,
|
|
47
47
|
max: testInfo.project.retries
|
|
48
48
|
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
},
|
|
50
|
+
/* ----------------------------------------
|
|
51
|
+
* Automatic Reporting Hook
|
|
52
|
+
* ---------------------------------------- */
|
|
53
|
+
_reportingHook: [async ({ retryInfo }, use, testInfo) => {
|
|
54
|
+
await use();
|
|
55
|
+
// š Auto-attach failure info to Allure
|
|
56
|
+
if (testInfo.status !== testInfo.expectedStatus) {
|
|
57
|
+
AllureUtil_1.AllureUtil.attachText('Test Failure Details', `Error: ${testInfo.error?.message || 'Unknown'}\nStack: ${testInfo.error?.stack || 'N/A'}`);
|
|
58
|
+
}
|
|
59
|
+
// š Log flaky test telemetry
|
|
60
|
+
if (retryInfo.current > 0) {
|
|
61
|
+
AllureUtil_1.AllureUtil.attachText('Retry Telemetry', `This test is being retried. Attempt: ${retryInfo.current} / ${retryInfo.max}`);
|
|
62
|
+
console.warn(`ā ļø Flaky test detected: "${testInfo.title}" (Retry ${retryInfo.current})`);
|
|
63
|
+
}
|
|
64
|
+
}, { auto: true }]
|
|
64
65
|
});
|
|
65
66
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../src/fixtures/fixtures.ts"],"names":[],"mappings":";;;AAAA,2CAAgD;AAChD,+EAA4E;AAC5E,qDAAkD;AAClD,6DAA0D;AAC1D,wDAAqD;
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../src/fixtures/fixtures.ts"],"names":[],"mappings":";;;AAAA,2CAAgD;AAChD,+EAA4E;AAC5E,qDAAkD;AAClD,6DAA0D;AAC1D,wDAAqD;AAoBrD;;GAEG;AACU,QAAA,IAAI,GAAG,WAAI,CAAC,MAAM,CAAoB;IAC/C;;kDAE8C;IAC9C,YAAY,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QAC5C,MAAM,YAAY,GAAG,IAAI,uCAAkB,CAAC,IAAI,EAAE;YAC9C,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,sCAAsC;SAClE,CAAC,CAAC;QACH,MAAM,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED;;kDAE8C;IAC9C,SAAS,EAAE,KAAK,EAAE,EAAG,EAAE,GAAG,EAA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7F,CAAC;YACN,CAAC;YAED,8BAA8B;YAC9B,IAAI,SAAS,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;gBACxB,uBAAU,CAAC,UAAU,CACjB,iBAAiB,EACjB,wCAAwC,SAAS,CAAC,OAAO,MAAM,SAAS,CAAC,GAAG,EAAE,CACjF,CAAC;gBACF,OAAO,CAAC,IAAI,CAAC,4BAA4B,QAAQ,CAAC,KAAK,YAAY,SAAS,CAAC,OAAO,GAAG,CAAC,CAAC;YAC7F,CAAC;QACL,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;CACrB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sridharkikkeri/playwright-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
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",
|
package/src/fixtures/fixtures.ts
CHANGED
|
@@ -18,6 +18,8 @@ export type FrameworkFixtures = {
|
|
|
18
18
|
locale: string;
|
|
19
19
|
/** Information about the current test retry state */
|
|
20
20
|
retryInfo: { current: number; max: number };
|
|
21
|
+
/** Internal fixture for automatic reporting hooks */
|
|
22
|
+
_reportingHook: void;
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
/**
|
|
@@ -64,27 +66,29 @@ export const test = base.extend<FrameworkFixtures>({
|
|
|
64
66
|
current: testInfo.retry,
|
|
65
67
|
max: testInfo.project.retries
|
|
66
68
|
});
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
+
},
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
/* ----------------------------------------
|
|
72
|
+
* Automatic Reporting Hook
|
|
73
|
+
* ---------------------------------------- */
|
|
74
|
+
_reportingHook: [async ({ retryInfo }, use, testInfo) => {
|
|
75
|
+
await use();
|
|
76
|
+
|
|
77
|
+
// š Auto-attach failure info to Allure
|
|
78
|
+
if (testInfo.status !== testInfo.expectedStatus) {
|
|
79
|
+
AllureUtil.attachText(
|
|
80
|
+
'Test Failure Details',
|
|
81
|
+
`Error: ${testInfo.error?.message || 'Unknown'}\nStack: ${testInfo.error?.stack || 'N/A'}`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
// š Log flaky test telemetry
|
|
86
|
+
if (retryInfo.current > 0) {
|
|
87
|
+
AllureUtil.attachText(
|
|
88
|
+
'Retry Telemetry',
|
|
89
|
+
`This test is being retried. Attempt: ${retryInfo.current} / ${retryInfo.max}`
|
|
90
|
+
);
|
|
91
|
+
console.warn(`ā ļø Flaky test detected: "${testInfo.title}" (Retry ${retryInfo.current})`);
|
|
92
|
+
}
|
|
93
|
+
}, { auto: true }]
|
|
90
94
|
});
|