@adobe/acc-js-sdk 1.1.46 → 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 +23 -0
- package/docs/download.html +25 -0
- package/docs/xtkJob.html +9 -0
- package/package-lock.json +24 -12
- package/package.json +1 -1
- package/samples/030 - basics - workflows.js +40 -0
- package/src/campaign.js +1 -2
- package/src/client.js +57 -1
- package/src/xtkJob.js +3 -1
- package/test/client.test.js +745 -440
- package/test/mock.js +31 -0
- package/test/xtkJob.test.js +10 -0
package/test/mock.js
CHANGED
|
@@ -742,6 +742,34 @@ const GET_XTK_WORKFLOW_SCHEMA_RESPONSE = Promise.resolve(`<?xml version='1.0'?>
|
|
|
742
742
|
<param name="parameters" type="DOMElement" inout="in"></param>
|
|
743
743
|
</parameters>
|
|
744
744
|
</method>
|
|
745
|
+
<method name="SimulateWithParameters" static="true">
|
|
746
|
+
<parameters>
|
|
747
|
+
<param name="workflowId" type="string" inout="in" />
|
|
748
|
+
<param name="parameters" type="DOMElement" inout="in"></param>
|
|
749
|
+
</parameters>
|
|
750
|
+
</method>
|
|
751
|
+
<method name="PostEvent" static="true">
|
|
752
|
+
<parameters>
|
|
753
|
+
<param name="workflowId" type="string" inout="in"/>
|
|
754
|
+
<param name="activity" type="string" inout="in"/>
|
|
755
|
+
<param name="transition" type="string" inout="in"/>
|
|
756
|
+
<param name="parameters" type="DOMElement" inout="in"/>
|
|
757
|
+
<param name="complete" type="boolean" inout="in"/>
|
|
758
|
+
</parameters>
|
|
759
|
+
</method>
|
|
760
|
+
<method name="SpawnWithParameters" static="true">
|
|
761
|
+
<parameters>
|
|
762
|
+
<param name="workflowId" type="string" inout="in" />
|
|
763
|
+
<param name="parameters" type="DOMElement" inout="in"></param>
|
|
764
|
+
</parameters>
|
|
765
|
+
</method>
|
|
766
|
+
<method name="SpawnWithParametersEx" static="true">
|
|
767
|
+
<parameters>
|
|
768
|
+
<param name="workflowId" type="string" inout="in" />
|
|
769
|
+
<param name="simulation" type="boolean" inout="in"/>
|
|
770
|
+
<param name="parameters" type="DOMElement" inout="in"></param>
|
|
771
|
+
</parameters>
|
|
772
|
+
</method>
|
|
745
773
|
</methods>
|
|
746
774
|
</schema>
|
|
747
775
|
</pdomDoc>
|
|
@@ -1075,6 +1103,8 @@ xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
|
|
|
1075
1103
|
</SOAP-ENV:Envelope>
|
|
1076
1104
|
`);
|
|
1077
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
|
+
|
|
1078
1108
|
// Public exports
|
|
1079
1109
|
exports.Mock = {
|
|
1080
1110
|
makeClient: makeClient,
|
|
@@ -1130,6 +1160,7 @@ exports.Mock = {
|
|
|
1130
1160
|
GET_XTK_COUNTER_RESPONSE: GET_XTK_COUNTER_RESPONSE,
|
|
1131
1161
|
GET_FILERES_QUERY_SCHEMA_RESPONSE: GET_FILERES_QUERY_SCHEMA_RESPONSE,
|
|
1132
1162
|
INCREASE_VALUE_RESPONSE: INCREASE_VALUE_RESPONSE,
|
|
1163
|
+
FILE_DOWNLOAD_RESPONSE: FILE_DOWNLOAD_RESPONSE,
|
|
1133
1164
|
FILE_RES_WRITE_RESPONSE: FILE_RES_WRITE_RESPONSE,
|
|
1134
1165
|
PUBLISH_IF_NEEDED_RESPONSE: PUBLISH_IF_NEEDED_RESPONSE,
|
|
1135
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", () => {
|