@dev-blinq/bvt-playwright-js 1.0.0-dev.4.staging.171.1 → 1.0.0-dev.4.staging.176.1
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/index.d.mts +22 -9
- package/index.mjs +11 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -1885,9 +1885,9 @@ declare const CommandSchema: z.ZodDiscriminatedUnion<[
|
|
|
1885
1885
|
], "type">;
|
|
1886
1886
|
score: z.ZodNumber;
|
|
1887
1887
|
source: z.ZodEnum<{
|
|
1888
|
-
role: "role";
|
|
1889
1888
|
xpath: "xpath";
|
|
1890
1889
|
testId: "testId";
|
|
1890
|
+
role: "role";
|
|
1891
1891
|
accessibleName: "accessibleName";
|
|
1892
1892
|
visibleText: "visibleText";
|
|
1893
1893
|
stableAttribute: "stableAttribute";
|
|
@@ -2655,9 +2655,9 @@ declare const CommandSchema: z.ZodDiscriminatedUnion<[
|
|
|
2655
2655
|
], "type">;
|
|
2656
2656
|
score: z.ZodNumber;
|
|
2657
2657
|
source: z.ZodEnum<{
|
|
2658
|
-
role: "role";
|
|
2659
2658
|
xpath: "xpath";
|
|
2660
2659
|
testId: "testId";
|
|
2660
|
+
role: "role";
|
|
2661
2661
|
accessibleName: "accessibleName";
|
|
2662
2662
|
visibleText: "visibleText";
|
|
2663
2663
|
stableAttribute: "stableAttribute";
|
|
@@ -3300,9 +3300,9 @@ declare const CommandSchema: z.ZodDiscriminatedUnion<[
|
|
|
3300
3300
|
], "type">;
|
|
3301
3301
|
score: z.ZodNumber;
|
|
3302
3302
|
source: z.ZodEnum<{
|
|
3303
|
-
role: "role";
|
|
3304
3303
|
xpath: "xpath";
|
|
3305
3304
|
testId: "testId";
|
|
3305
|
+
role: "role";
|
|
3306
3306
|
accessibleName: "accessibleName";
|
|
3307
3307
|
visibleText: "visibleText";
|
|
3308
3308
|
stableAttribute: "stableAttribute";
|
|
@@ -4896,9 +4896,9 @@ declare const StepDefinitionSchema: z.ZodObject<{
|
|
|
4896
4896
|
], "type">;
|
|
4897
4897
|
score: z.ZodNumber;
|
|
4898
4898
|
source: z.ZodEnum<{
|
|
4899
|
-
role: "role";
|
|
4900
4899
|
xpath: "xpath";
|
|
4901
4900
|
testId: "testId";
|
|
4901
|
+
role: "role";
|
|
4902
4902
|
accessibleName: "accessibleName";
|
|
4903
4903
|
visibleText: "visibleText";
|
|
4904
4904
|
stableAttribute: "stableAttribute";
|
|
@@ -5666,9 +5666,9 @@ declare const StepDefinitionSchema: z.ZodObject<{
|
|
|
5666
5666
|
], "type">;
|
|
5667
5667
|
score: z.ZodNumber;
|
|
5668
5668
|
source: z.ZodEnum<{
|
|
5669
|
-
role: "role";
|
|
5670
5669
|
xpath: "xpath";
|
|
5671
5670
|
testId: "testId";
|
|
5671
|
+
role: "role";
|
|
5672
5672
|
accessibleName: "accessibleName";
|
|
5673
5673
|
visibleText: "visibleText";
|
|
5674
5674
|
stableAttribute: "stableAttribute";
|
|
@@ -6311,9 +6311,9 @@ declare const StepDefinitionSchema: z.ZodObject<{
|
|
|
6311
6311
|
], "type">;
|
|
6312
6312
|
score: z.ZodNumber;
|
|
6313
6313
|
source: z.ZodEnum<{
|
|
6314
|
-
role: "role";
|
|
6315
6314
|
xpath: "xpath";
|
|
6316
6315
|
testId: "testId";
|
|
6316
|
+
role: "role";
|
|
6317
6317
|
accessibleName: "accessibleName";
|
|
6318
6318
|
visibleText: "visibleText";
|
|
6319
6319
|
stableAttribute: "stableAttribute";
|
|
@@ -6910,9 +6910,9 @@ declare const ReplayLocatorCandidateSchema: z.ZodObject<{
|
|
|
6910
6910
|
], "type">;
|
|
6911
6911
|
score: z.ZodNumber;
|
|
6912
6912
|
source: z.ZodEnum<{
|
|
6913
|
-
role: "role";
|
|
6914
6913
|
xpath: "xpath";
|
|
6915
6914
|
testId: "testId";
|
|
6915
|
+
role: "role";
|
|
6916
6916
|
accessibleName: "accessibleName";
|
|
6917
6917
|
visibleText: "visibleText";
|
|
6918
6918
|
stableAttribute: "stableAttribute";
|
|
@@ -7192,9 +7192,9 @@ declare const StepReplayTelemetrySchema: z.ZodObject<{
|
|
|
7192
7192
|
], "type">;
|
|
7193
7193
|
score: z.ZodNumber;
|
|
7194
7194
|
source: z.ZodEnum<{
|
|
7195
|
-
role: "role";
|
|
7196
7195
|
xpath: "xpath";
|
|
7197
7196
|
testId: "testId";
|
|
7197
|
+
role: "role";
|
|
7198
7198
|
accessibleName: "accessibleName";
|
|
7199
7199
|
visibleText: "visibleText";
|
|
7200
7200
|
stableAttribute: "stableAttribute";
|
|
@@ -7894,9 +7894,9 @@ declare const PickedElementSchema: z.ZodObject<{
|
|
|
7894
7894
|
], "type">;
|
|
7895
7895
|
score: z.ZodNumber;
|
|
7896
7896
|
source: z.ZodEnum<{
|
|
7897
|
-
role: "role";
|
|
7898
7897
|
xpath: "xpath";
|
|
7899
7898
|
testId: "testId";
|
|
7899
|
+
role: "role";
|
|
7900
7900
|
accessibleName: "accessibleName";
|
|
7901
7901
|
visibleText: "visibleText";
|
|
7902
7902
|
stableAttribute: "stableAttribute";
|
|
@@ -9308,6 +9308,19 @@ type TesterSession = {
|
|
|
9308
9308
|
*/
|
|
9309
9309
|
screenshots?: {
|
|
9310
9310
|
enabled: boolean;
|
|
9311
|
+
/**
|
|
9312
|
+
* "upload" (default): Tester requests presigned URLs and uploads the
|
|
9313
|
+
* captured JPEGs to S3 itself at the end of the testcase.
|
|
9314
|
+
* "local": Tester captures JPEGs to `outputDir` and leaves them on disk
|
|
9315
|
+
* for an out-of-band uploader (mirrors the local-trace mode used by the
|
|
9316
|
+
* execution worker, which has no presigned-URL API client).
|
|
9317
|
+
*/
|
|
9318
|
+
mode?: "upload" | "local";
|
|
9319
|
+
/**
|
|
9320
|
+
* Local-mode capture directory. When omitted a per-testcase /tmp dir is
|
|
9321
|
+
* used. Ignored in "upload" mode.
|
|
9322
|
+
*/
|
|
9323
|
+
outputDir?: string;
|
|
9311
9324
|
};
|
|
9312
9325
|
deterministicRecoveryMode?: "new-tour-maintenance";
|
|
9313
9326
|
};
|
package/index.mjs
CHANGED
|
@@ -26460,7 +26460,7 @@ var Tester = class {
|
|
|
26460
26460
|
return `${this.dataContext?.projectId ?? ""}/${session.reportId}/testcases/${session.testCaseId}/resources/screenshots/${stepId}-${commandId}-${phase}.jpg`;
|
|
26461
26461
|
}
|
|
26462
26462
|
getScreenshotTempDir(session) {
|
|
26463
|
-
if (!this.tempPathForAssets) this.tempPathForAssets = join("/tmp", `blinq-screenshots-${session.reportId}-${session.testCaseId}`);
|
|
26463
|
+
if (!this.tempPathForAssets) this.tempPathForAssets = session.screenshots?.outputDir ?? join("/tmp", `blinq-screenshots-${session.reportId}-${session.testCaseId}`);
|
|
26464
26464
|
return this.tempPathForAssets;
|
|
26465
26465
|
}
|
|
26466
26466
|
/**
|
|
@@ -27050,6 +27050,16 @@ var Tester = class {
|
|
|
27050
27050
|
});
|
|
27051
27051
|
return false;
|
|
27052
27052
|
}
|
|
27053
|
+
if (session.screenshots?.mode === "local") {
|
|
27054
|
+
this.obs.logger.log("Screenshots captured in local mode; leaving files for out-of-band upload", {
|
|
27055
|
+
reportId: session.reportId,
|
|
27056
|
+
testCaseId: session.testCaseId,
|
|
27057
|
+
capturedCount,
|
|
27058
|
+
dir: this.tempPathForAssets
|
|
27059
|
+
});
|
|
27060
|
+
this.capturedScreenshots = [];
|
|
27061
|
+
return capturedCount > 0;
|
|
27062
|
+
}
|
|
27053
27063
|
if (!session.token) {
|
|
27054
27064
|
this.obs.metrics.count("bvt_agent.screenshots.upload.skipped.total", 1, { reason: "no-session-token" });
|
|
27055
27065
|
this.obs.logger.warn(`Screenshot upload skipped because no session token was provided for reportId: ${session.reportId}, testCaseId: ${session.testCaseId}.`);
|