@adobe/acc-js-sdk 1.1.47 → 1.1.48
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/docs/_data/navigation.yml +2 -0
- package/docs/changeLog.html +15 -1
- package/docs/download.html +25 -0
- package/docs/xtkJob.html +9 -0
- package/package-lock.json +24 -12
- package/package.json +1 -1
- package/src/campaign.js +1 -2
- package/src/client.js +54 -0
- package/src/xtkJob.js +3 -1
- package/test/client.test.js +708 -421
- package/test/mock.js +3 -0
- package/test/xtkJob.test.js +10 -0
package/test/mock.js
CHANGED
|
@@ -1103,6 +1103,8 @@ xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
|
1103
1103
|
</SOAP-ENV:Envelope>
|
|
1104
1104
|
`);
|
|
1105
1105
|
|
|
1106
|
+
const FILE_DOWNLOAD_RESPONSE = '"First Name","Last Name","E-Mail","Blocked","Title","Phone","Units","Gender","Department","Location","Preference 1","Preference 2"\n"Vishal","Kumar (from file)","kumarvishal@adobe.com","false","Developer","9911422203","$030,321","Male","UI","N132","Agriculture","Forestry and Fishing"';
|
|
1107
|
+
|
|
1106
1108
|
// Public exports
|
|
1107
1109
|
exports.Mock = {
|
|
1108
1110
|
makeClient: makeClient,
|
|
@@ -1158,6 +1160,7 @@ exports.Mock = {
|
|
|
1158
1160
|
GET_XTK_COUNTER_RESPONSE: GET_XTK_COUNTER_RESPONSE,
|
|
1159
1161
|
GET_FILERES_QUERY_SCHEMA_RESPONSE: GET_FILERES_QUERY_SCHEMA_RESPONSE,
|
|
1160
1162
|
INCREASE_VALUE_RESPONSE: INCREASE_VALUE_RESPONSE,
|
|
1163
|
+
FILE_DOWNLOAD_RESPONSE: FILE_DOWNLOAD_RESPONSE,
|
|
1161
1164
|
FILE_RES_WRITE_RESPONSE: FILE_RES_WRITE_RESPONSE,
|
|
1162
1165
|
PUBLISH_IF_NEEDED_RESPONSE: PUBLISH_IF_NEEDED_RESPONSE,
|
|
1163
1166
|
GET_URL_RESPONSE: GET_URL_RESPONSE,
|
package/test/xtkJob.test.js
CHANGED
|
@@ -487,6 +487,16 @@ describe('XRK Jobs', function () {
|
|
|
487
487
|
expect(client.NLWS.xtkJob.getStatus.mock.calls.length).toBe(1);
|
|
488
488
|
expect(client.NLWS.xtkJob.getStatus.mock.calls[0]).toEqual(["ABC", 12, 500]);
|
|
489
489
|
});
|
|
490
|
+
|
|
491
|
+
it("Should get status from provided jobId", async () => {
|
|
492
|
+
const jobId = 'ABC';
|
|
493
|
+
const client = { NLWS: { xtkJob: { getStatus: jest.fn() } } };
|
|
494
|
+
const job = new XtkJobInterface(client, { jobId });
|
|
495
|
+
client.NLWS.xtkJob.getStatus.mockReturnValueOnce(Promise.resolve({ }));
|
|
496
|
+
await job.getStatus(12, 500);
|
|
497
|
+
expect(client.NLWS.xtkJob.getStatus.mock.calls.length).toBe(1);
|
|
498
|
+
expect(client.NLWS.xtkJob.getStatus.mock.calls[0]).toEqual([jobId, 12, 500]);
|
|
499
|
+
});
|
|
490
500
|
});
|
|
491
501
|
|
|
492
502
|
describe("Get Result", () => {
|