@auxcode/auxta 1.3.65 → 1.3.66

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.
@@ -38,6 +38,7 @@ class EmailHelper {
38
38
  throw new Error('No messagesIds found.');
39
39
  }
40
40
  const runs = [];
41
+ let count = 0;
41
42
  for (const messageId of messagesIds) {
42
43
  if (messageId.id) {
43
44
  runs.push(yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.get({
@@ -45,16 +46,22 @@ class EmailHelper {
45
46
  id: messageId.id.toString(),
46
47
  format: 'FULL'
47
48
  }));
49
+ count++;
48
50
  }
49
51
  }
52
+ log_service_1.default.push('Then', `count ${count}`, AuxTA_1.StepStatus.PASSED);
50
53
  yield Promise.all(runs);
51
54
  log_service_1.default.push('Then', `Getting the full details of the emails`, AuxTA_1.StepStatus.PASSED);
52
55
  for (const gmailResponse of runs) {
53
56
  if (gmailResponse) {
57
+ log_service_1.default.push('Then', `I check payload && id && threadId`, AuxTA_1.StepStatus.PASSED);
54
58
  if (gmailResponse.data.payload && gmailResponse.data.id && gmailResponse.data.threadId) {
55
59
  const message_sender = this.getHeader('from', gmailResponse);
60
+ log_service_1.default.push('Then', `I got message_sender`, AuxTA_1.StepStatus.PASSED);
56
61
  const message_subject = this.getHeader('subject', gmailResponse);
62
+ log_service_1.default.push('Then', `I got message_body`, AuxTA_1.StepStatus.PASSED);
57
63
  const message_body = this.getBody(subject, gmailResponse);
64
+ log_service_1.default.push('Then', `I got message_body`, AuxTA_1.StepStatus.PASSED);
58
65
  if (message_sender.toLocaleLowerCase().includes(from_email) && message_sender.toLocaleLowerCase().includes(from_name.toLocaleLowerCase()) &&
59
66
  message_subject.toLocaleLowerCase().includes(subject.toLocaleLowerCase()) && message_body.toLocaleLowerCase().includes(body.toLocaleLowerCase())) {
60
67
  log_service_1.default.push('Then', `Email from: ${from_name} ${from_email} with subject: ${subject} and body: ${body} is found`, AuxTA_1.StepStatus.PASSED);
@@ -66,12 +73,15 @@ class EmailHelper {
66
73
  'removeLabelIds': ['UNREAD']
67
74
  }
68
75
  });
76
+ log_service_1.default.push('Then', `I got modify email`, AuxTA_1.StepStatus.PASSED);
69
77
  if (link) {
70
78
  const html_link = yield this.getUrl(message_body);
79
+ log_service_1.default.push('Then', `I get html lik`, AuxTA_1.StepStatus.PASSED);
71
80
  yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.delete({
72
81
  userId: "me",
73
82
  id: gmailResponse.data.id,
74
83
  });
84
+ log_service_1.default.push('Then', `I deleted email`, AuxTA_1.StepStatus.PASSED);
75
85
  return {
76
86
  id: gmailResponse.data.id,
77
87
  threadId: gmailResponse.data.threadId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auxcode/auxta",
3
- "version": "1.3.65",
3
+ "version": "1.3.66",
4
4
  "description": "",
5
5
  "main": "./build/AuxTA.js",
6
6
  "types": "./build/AuxTA.d.ts",