@auxcode/auxta 1.3.53 → 1.3.54
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.
|
@@ -145,11 +145,11 @@ function compareScreenshots(key, screenshot) {
|
|
|
145
145
|
data: screenshot,
|
|
146
146
|
mime_type: "image/png"
|
|
147
147
|
};
|
|
148
|
-
return yield axios_1.default.post(`${config_1.config.auxtaURL}save-compared-screenshot`, {
|
|
148
|
+
return (yield axios_1.default.post(`${config_1.config.auxtaURL}save-compared-screenshot`, {
|
|
149
149
|
organization: config_1.config.organization,
|
|
150
150
|
key: key,
|
|
151
151
|
embedding: embedding,
|
|
152
|
-
}, headers(token));
|
|
152
|
+
}, headers(token))).data;
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
exports.compareScreenshots = compareScreenshots;
|
|
@@ -39,8 +39,13 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
39
39
|
const screenshotBuffer = yield (0, screenshot_helper_1.captureScreenshotPage)(page);
|
|
40
40
|
if (screenshotBuffer) {
|
|
41
41
|
const screenshot = screenshotBuffer.toString('base64');
|
|
42
|
-
yield (0, report_service_1.compareScreenshots)(key, screenshot);
|
|
43
|
-
|
|
42
|
+
const result = yield (0, report_service_1.compareScreenshots)(key, screenshot);
|
|
43
|
+
if (result.presentDifference && Number(result.presentDifference) > 0) {
|
|
44
|
+
log_service_1.default.push('Then', `I compare screenshots with key ${key}, and difference is: ${result.presentDifference}%`, status_of_step_1.StatusOfStep.FAILED, screenshot, key);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
log_service_1.default.push('Then', `I compare screenshots with key ${key}`, status_of_step_1.StatusOfStep.PASSED, screenshot, key);
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
else {
|
|
@@ -26,7 +26,7 @@ class EmailHelper {
|
|
|
26
26
|
while (timeoutCount <= 60000) {
|
|
27
27
|
const res = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.list({
|
|
28
28
|
userId: "me",
|
|
29
|
-
maxResults:
|
|
29
|
+
maxResults: 10
|
|
30
30
|
});
|
|
31
31
|
const messagesIds = res.data.messages;
|
|
32
32
|
if (!messagesIds || messagesIds.length === 0) {
|
|
@@ -56,6 +56,10 @@ class EmailHelper {
|
|
|
56
56
|
});
|
|
57
57
|
if (link) {
|
|
58
58
|
const html_link = yield this.getUrl(message_body);
|
|
59
|
+
yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.delete({
|
|
60
|
+
userId: "me",
|
|
61
|
+
id: gmailResponse.data.id,
|
|
62
|
+
});
|
|
59
63
|
return {
|
|
60
64
|
id: gmailResponse.data.id,
|
|
61
65
|
threadId: gmailResponse.data.threadId,
|