@elliemae/smoked-suite 26.2.24 → 26.2.26
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/dist/.tsbuildinfo +1 -0
- package/dist/cjs/heap-memory-profiler/index.js +4 -1
- package/dist/esm/heap-memory-profiler/index.js +4 -1
- package/dist/types/lib/heap-memory-profiler/index.d.ts +2 -1
- package/dist/types/lib/heap-memory-profiler/tests/subclass.test.d.ts +1 -0
- package/package.json +2 -2
- package/dist/types/tsconfig.tsbuildinfo +0 -1
|
@@ -48,6 +48,9 @@ class HeapMemoryProfiler {
|
|
|
48
48
|
outputDir;
|
|
49
49
|
/** Memento store: maps snapshot label → absolute file path on disk. */
|
|
50
50
|
snapshots = /* @__PURE__ */ new Map();
|
|
51
|
+
getCDPTarget() {
|
|
52
|
+
return this.page;
|
|
53
|
+
}
|
|
51
54
|
// ─── Browser guard ──────────────────────────────────────────────────────────
|
|
52
55
|
isChromium() {
|
|
53
56
|
return this.page.context().browser()?.browserType().name() === "chromium";
|
|
@@ -65,7 +68,7 @@ class HeapMemoryProfiler {
|
|
|
65
68
|
*/
|
|
66
69
|
async captureSnapshot(label) {
|
|
67
70
|
if (!this.isChromium()) return "";
|
|
68
|
-
const client = await this.page.context().newCDPSession(this.
|
|
71
|
+
const client = await this.page.context().newCDPSession(this.getCDPTarget());
|
|
69
72
|
await client.send("HeapProfiler.enable");
|
|
70
73
|
const chunks = [];
|
|
71
74
|
client.on(
|
|
@@ -15,6 +15,9 @@ class HeapMemoryProfiler {
|
|
|
15
15
|
outputDir;
|
|
16
16
|
/** Memento store: maps snapshot label → absolute file path on disk. */
|
|
17
17
|
snapshots = /* @__PURE__ */ new Map();
|
|
18
|
+
getCDPTarget() {
|
|
19
|
+
return this.page;
|
|
20
|
+
}
|
|
18
21
|
// ─── Browser guard ──────────────────────────────────────────────────────────
|
|
19
22
|
isChromium() {
|
|
20
23
|
return this.page.context().browser()?.browserType().name() === "chromium";
|
|
@@ -32,7 +35,7 @@ class HeapMemoryProfiler {
|
|
|
32
35
|
*/
|
|
33
36
|
async captureSnapshot(label) {
|
|
34
37
|
if (!this.isChromium()) return "";
|
|
35
|
-
const client = await this.page.context().newCDPSession(this.
|
|
38
|
+
const client = await this.page.context().newCDPSession(this.getCDPTarget());
|
|
36
39
|
await client.send("HeapProfiler.enable");
|
|
37
40
|
const chunks = [];
|
|
38
41
|
client.on(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Page } from '@playwright/test';
|
|
1
|
+
import type { Page, Frame } from '@playwright/test';
|
|
2
2
|
import type { ComparisonReport } from '@elliemae/encw-heap-doctor';
|
|
3
3
|
import type { HeapProfilingOptions } from '../types.js';
|
|
4
4
|
export type { HeapProfilingOptions };
|
|
@@ -50,6 +50,7 @@ export declare class HeapMemoryProfiler {
|
|
|
50
50
|
* Created automatically if it does not exist.
|
|
51
51
|
*/
|
|
52
52
|
constructor(page: Page, outputDir: string);
|
|
53
|
+
protected getCDPTarget(): Page | Frame;
|
|
53
54
|
private isChromium;
|
|
54
55
|
/**
|
|
55
56
|
* Capture a Chrome heap snapshot via CDP and persist it to disk.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/smoked-suite",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.26",
|
|
4
4
|
"description": "Shared Playwright test infrastructure for ICE micro-frontend apps running inside encw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@elliemae/encw-heap-doctor": "26.2.
|
|
49
|
+
"@elliemae/encw-heap-doctor": "26.2.15"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@playwright/test": "~1.58.2",
|