@getjones/test-infra 4.5.13 → 4.5.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/package.json
CHANGED
|
@@ -17,8 +17,7 @@ const Endpoints = {
|
|
|
17
17
|
resumeAudit: onHoldId => `${backendUrl}/saas/auditor/on-hold/${onHoldId}/resume`,
|
|
18
18
|
getAuditMetadata: auditId => `${backendUrl}/saas/auditor/audit-metadata/${auditId}`,
|
|
19
19
|
updateComplianceAuditActionsDate: recordId => `${backendUrl}/saas/automation/record/${recordId}/update-audit-actions-date`,
|
|
20
|
-
auditRawData: recordId => `${backendUrl}/saas/integration-tests/record/${recordId}/audit/raw
|
|
21
|
-
getAuditResultAttributeState: auditId => `${backendUrl}/saas/automation/audit/${auditId}`
|
|
20
|
+
auditRawData: recordId => `${backendUrl}/saas/integration-tests/record/${recordId}/audit/raw`
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
const submitAudit = async (auditRequestModel, context) => {
|
|
@@ -87,10 +86,6 @@ const getAuditRawData = (recordId, context) => {
|
|
|
87
86
|
return requests.getRequestHandler(Endpoints.auditRawData(recordId), {}, context);
|
|
88
87
|
};
|
|
89
88
|
|
|
90
|
-
const getAuditResultAttributeState = (auditId, context) => {
|
|
91
|
-
return requests.getRequestHandler(Endpoints.getAuditResultAttributeState(auditId), {}, context, {});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
89
|
module.exports = {
|
|
95
90
|
submitAudit,
|
|
96
91
|
revertCoi,
|
|
@@ -107,6 +102,5 @@ module.exports = {
|
|
|
107
102
|
getAuditMetadata,
|
|
108
103
|
updateComplianceAuditActionsDate,
|
|
109
104
|
getAuditRawData,
|
|
110
|
-
verifyAuditBeforeEnter
|
|
111
|
-
getAuditResultAttributeState
|
|
105
|
+
verifyAuditBeforeEnter
|
|
112
106
|
};
|
|
@@ -279,16 +279,6 @@ const getAttributeKey = attributeName => {
|
|
|
279
279
|
return auditUtil.getAttributeKey(attributeName);
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
const getAuditResultAttributeState = async function(auditId, context) {
|
|
283
|
-
const attributeStateResponse = await auditApi.getAuditResultAttributeState(auditId, context);
|
|
284
|
-
|
|
285
|
-
if (attributeStateResponse.status !== httpResponseStatusCodes.OK) {
|
|
286
|
-
throw Error(`Failed to get audit result attribute state, status - ${attributeStateResponse.status}`);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return attributeStateResponse.data;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
282
|
module.exports = {
|
|
293
283
|
submitAudit,
|
|
294
284
|
revertCoi,
|
|
@@ -313,6 +303,5 @@ module.exports = {
|
|
|
313
303
|
getCurrentAuditUniqueCoiId,
|
|
314
304
|
getAuditRawData,
|
|
315
305
|
getAuditorContractorReviewByRecordId,
|
|
316
|
-
getAttributeKey
|
|
317
|
-
getAuditResultAttributeState
|
|
306
|
+
getAttributeKey
|
|
318
307
|
};
|
|
@@ -78,9 +78,8 @@ const reinviteUser = (userId, context) => {
|
|
|
78
78
|
return requests.postRequestHandler(Endpoints.reinvite, {}, context, {}, params);
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
const editUserEmailNotificationsSettings = (
|
|
82
|
-
|
|
83
|
-
return requests.postRequestHandler(Endpoints.userEmailNotificationsSettings, notificationSettingsModel, context, {}, params);
|
|
81
|
+
const editUserEmailNotificationsSettings = (notificationSettingsModel, context) => {
|
|
82
|
+
return requests.postRequestHandler(Endpoints.userEmailNotificationsSettings, notificationSettingsModel, context);
|
|
84
83
|
};
|
|
85
84
|
|
|
86
85
|
const createInnerSystemUser = (innerSystemUser, icsContext) => {
|
|
@@ -147,9 +147,9 @@ const reinviteUser = (userId, context) => {
|
|
|
147
147
|
return userAPI.reinviteUser(userId, context);
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
const editUserEmailNotificationsSettings = (
|
|
150
|
+
const editUserEmailNotificationsSettings = (notificationSettingsModel, context) => {
|
|
151
151
|
validateType(notificationSettingsModel, NotificationSettingsModel);
|
|
152
|
-
return userAPI.editUserEmailNotificationsSettings(
|
|
152
|
+
return userAPI.editUserEmailNotificationsSettings(notificationSettingsModel, context);
|
|
153
153
|
};
|
|
154
154
|
|
|
155
155
|
const createInnerSystemUser = async (createInnerSystemUserModel, icsContext) => {
|
|
@@ -218,7 +218,7 @@ const editUserSettings = async (email, config, userContext) => {
|
|
|
218
218
|
const { data: user } = await getUserByEmail(email, systemUserContext);
|
|
219
219
|
|
|
220
220
|
const settingModel = util.getSettingsModel(config);
|
|
221
|
-
const response = await userAPI.editUserEmailNotificationsSettings(
|
|
221
|
+
const response = await userAPI.editUserEmailNotificationsSettings(settingModel, userContext);
|
|
222
222
|
|
|
223
223
|
if (response.status !== httpResponseStatusCodes.OK) {
|
|
224
224
|
throw Error(`Failed to edit user id: [${user.id}] settings\n${response}`);
|