playwright-opentelemetry 0.3.3 → 0.3.4
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/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ const ATTR_TEST_STEP_CATEGORY = "test.step.category";
|
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region package.json
|
|
24
|
-
var version = "0.3.
|
|
24
|
+
var version = "0.3.4";
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/reporter/sender.ts
|
|
@@ -131,6 +131,11 @@ function getZipFilename(test, testId) {
|
|
|
131
131
|
}
|
|
132
132
|
const PLAYWRIGHT_TRACE_RESOURCES_DIR = "resources/";
|
|
133
133
|
/**
|
|
134
|
+
* Pattern to match Playwright screenshot filenames: {name}@{hex-hash}-{timestamp}.jpeg
|
|
135
|
+
* Examples: page@f06f11f7c14d6ce1060d47d79f05c154-1766833384425.jpeg
|
|
136
|
+
*/
|
|
137
|
+
const PLAYWRIGHT_SCREENSHOT_PATTERN = /^.+@[a-f0-9]+-\d+\.jpe?g$/i;
|
|
138
|
+
/**
|
|
134
139
|
* Extract screenshots from a Playwright trace ZIP file.
|
|
135
140
|
* Screenshots are stored in the resources/ directory with names like:
|
|
136
141
|
* {pageGuid}-{timestamp}.jpeg (e.g., page@abc123-1766929201038.jpeg)
|
|
@@ -148,7 +153,7 @@ async function extractScreenshotsFromPlaywrightTrace(traceZipPath) {
|
|
|
148
153
|
if (!isFileEntry(entry)) return false;
|
|
149
154
|
if (!entry.filename.startsWith(PLAYWRIGHT_TRACE_RESOURCES_DIR)) return false;
|
|
150
155
|
const name = entry.filename.slice(10);
|
|
151
|
-
return
|
|
156
|
+
return PLAYWRIGHT_SCREENSHOT_PATTERN.test(name);
|
|
152
157
|
}).map(async (entry) => {
|
|
153
158
|
const filename = entry.filename.slice(10);
|
|
154
159
|
const blob = await entry.getData(new BlobWriter("image/jpeg"));
|
package/dist/reporter.mjs
CHANGED