screenright-client 0.9.13 → 0.9.14
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.d.ts +1 -0
- package/dist/index.js +4 -1
- package/package.json +1 -1
- package/src/index.ts +7 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -72,13 +72,14 @@ export const capture = (page, key, title, parentKey, options = {}) => __awaiter(
|
|
|
72
72
|
errorOccurred('Capture argument[key] cannot contain slashes.');
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
let { waitMilliseconds, clickLocatorSelector, annotationText, paddingPixel, annotationDirection, annotationTextColor } = options;
|
|
75
|
+
let { waitMilliseconds, clickLocatorSelector, annotationText, paddingPixel, annotationDirection, annotationTextColor, description } = options;
|
|
76
76
|
waitMilliseconds = waitMilliseconds || 0;
|
|
77
77
|
clickLocatorSelector = clickLocatorSelector || undefined;
|
|
78
78
|
annotationText = annotationText || "";
|
|
79
79
|
paddingPixel = paddingPixel || 4;
|
|
80
80
|
annotationDirection = annotationDirection || "bottom";
|
|
81
81
|
annotationTextColor = annotationTextColor || "red";
|
|
82
|
+
description = description || "";
|
|
82
83
|
if (waitMilliseconds) {
|
|
83
84
|
const nWaitMilliseconds = Number(waitMilliseconds);
|
|
84
85
|
if (0 < waitMilliseconds) {
|
|
@@ -112,6 +113,7 @@ export const capture = (page, key, title, parentKey, options = {}) => __awaiter(
|
|
|
112
113
|
title,
|
|
113
114
|
url: page.url(),
|
|
114
115
|
children: [],
|
|
116
|
+
description: "",
|
|
115
117
|
};
|
|
116
118
|
if (parentKey) {
|
|
117
119
|
const searchParent = (attributes) => {
|
|
@@ -140,6 +142,7 @@ export const capture = (page, key, title, parentKey, options = {}) => __awaiter(
|
|
|
140
142
|
paddingPixel,
|
|
141
143
|
direction: annotationDirection,
|
|
142
144
|
textColor: annotationTextColor,
|
|
145
|
+
description,
|
|
143
146
|
};
|
|
144
147
|
result.annotations[key] = annotation;
|
|
145
148
|
yield locator.click();
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ type ScreenshotItemAttribute = {
|
|
|
10
10
|
title: string
|
|
11
11
|
url: string
|
|
12
12
|
children: ScreenshotItemAttribute[]
|
|
13
|
+
description: string
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
type Result = {
|
|
@@ -96,6 +97,7 @@ type CaptureOptions = {
|
|
|
96
97
|
paddingPixel?: number | undefined
|
|
97
98
|
annotationDirection?: AnnotationDirection | undefined
|
|
98
99
|
annotationTextColor?: AnnotationTextColor | undefined
|
|
100
|
+
description?: string | undefined
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
/**
|
|
@@ -128,7 +130,8 @@ export const capture = async (
|
|
|
128
130
|
annotationText,
|
|
129
131
|
paddingPixel,
|
|
130
132
|
annotationDirection,
|
|
131
|
-
annotationTextColor
|
|
133
|
+
annotationTextColor,
|
|
134
|
+
description
|
|
132
135
|
} = options
|
|
133
136
|
|
|
134
137
|
waitMilliseconds = waitMilliseconds || 0
|
|
@@ -137,6 +140,7 @@ export const capture = async (
|
|
|
137
140
|
paddingPixel = paddingPixel || 4
|
|
138
141
|
annotationDirection = annotationDirection || "bottom"
|
|
139
142
|
annotationTextColor = annotationTextColor || "red"
|
|
143
|
+
description = description || ""
|
|
140
144
|
|
|
141
145
|
if (waitMilliseconds) {
|
|
142
146
|
const nWaitMilliseconds = Number(waitMilliseconds)
|
|
@@ -175,6 +179,7 @@ export const capture = async (
|
|
|
175
179
|
title,
|
|
176
180
|
url: page.url(),
|
|
177
181
|
children: [],
|
|
182
|
+
description: "",
|
|
178
183
|
}
|
|
179
184
|
|
|
180
185
|
if (parentKey) {
|
|
@@ -206,6 +211,7 @@ export const capture = async (
|
|
|
206
211
|
paddingPixel,
|
|
207
212
|
direction: annotationDirection,
|
|
208
213
|
textColor: annotationTextColor,
|
|
214
|
+
description,
|
|
209
215
|
}
|
|
210
216
|
|
|
211
217
|
result.annotations[key] = annotation
|