Skip to content

Commit

Permalink
#62: added test for basic multi-step journey
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed May 4, 2024
1 parent b58668a commit 33b0200
Show file tree
Hide file tree
Showing 10 changed files with 592 additions and 13 deletions.
4 changes: 2 additions & 2 deletions test/general.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ describe('GENERAL', () => {
);
assert.equal(
Object.keys(result[buName]['dataExtension']).length,
3,
'retrieve should have returned 3 dataExtension'
5,
'retrieve should have returned 5 dataExtension'
);
assert.equal(
Object.keys(result[buName]['dataExtract']).length,
Expand Down
48 changes: 48 additions & 0 deletions test/resources/9999999/dataExtension/retrieve-response.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,54 @@
<RetainUntil />
<CategoryID>2</CategoryID>
</Results>
<Results xsi:type="DataExtension">
<PartnerKey xsi:nil="true" />
<CreatedDate>2024-04-24T12:09:53.527</CreatedDate>
<ModifiedDate>2024-04-24T12:09:53.527</ModifiedDate>
<ObjectID>1c8064d5-6502-ef11-a5c8-5cba2c702db8</ObjectID>
<CustomerKey>testExisting_journey_Quicksend</CustomerKey>
<Name>testExisting_journey_Quicksend</Name>
<Description />
<IsSendable>true</IsSendable>
<IsTestable>false</IsTestable>
<SendableDataExtensionField>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<Name>ContactId</Name>
</SendableDataExtensionField>
<SendableSubscriberField>
<Name>_SubscriberKey</Name>
</SendableSubscriberField>
<RowBasedRetention>false</RowBasedRetention>
<ResetRetentionPeriodOnImport>false</ResetRetentionPeriodOnImport>
<DeleteAtEndOfRetentionPeriod>false</DeleteAtEndOfRetentionPeriod>
<RetainUntil />
<CategoryID>290821</CategoryID>
</Results>
<Results xsi:type="DataExtension">
<PartnerKey xsi:nil="true" />
<CreatedDate>2024-04-24T12:10:46.457</CreatedDate>
<ModifiedDate>2024-04-24T12:10:46.457</ModifiedDate>
<ObjectID>ed305df3-6502-ef11-a5c8-5cba2c702db8</ObjectID>
<CustomerKey>testExisting_journey_Multistep</CustomerKey>
<Name>testExisting_journey_Multistep</Name>
<Description />
<IsSendable>true</IsSendable>
<IsTestable>false</IsTestable>
<SendableDataExtensionField>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<Name>ContactId</Name>
</SendableDataExtensionField>
<SendableSubscriberField>
<Name>_SubscriberKey</Name>
</SendableSubscriberField>
<RowBasedRetention>false</RowBasedRetention>
<ResetRetentionPeriodOnImport>false</ResetRetentionPeriodOnImport>
<DeleteAtEndOfRetentionPeriod>false</DeleteAtEndOfRetentionPeriod>
<RetainUntil />
<CategoryID>2</CategoryID>
</Results>
</RetrieveResponseMsg>
</soap:Body>
</soap:Envelope>
72 changes: 72 additions & 0 deletions test/resources/9999999/dataExtensionField/retrieve-response.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,78 @@
<CustomerKey>testExisting_dataExtension</CustomerKey>
</DataExtension>
</Results>
<Results xsi:type="DataExtensionField">
<PartnerKey xsi:nil="true" />
<ObjectID>78b6d411-a5a3-42ac-b9ef-4b5b31db861d</ObjectID>
<CustomerKey>[testExisting_journey_Multistep].[Email]</CustomerKey>
<Name>Email</Name>
<Scale>0</Scale>
<DefaultValue />
<MaxLength>254</MaxLength>
<IsRequired>true</IsRequired>
<Ordinal>1</Ordinal>
<IsPrimaryKey>false</IsPrimaryKey>
<FieldType>EmailAddress</FieldType>
<DataExtension>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<CustomerKey>testExisting_journey_Multistep</CustomerKey>
</DataExtension>
</Results>
<Results xsi:type="DataExtensionField">
<PartnerKey xsi:nil="true" />
<ObjectID>d38a445a-34b4-499d-9764-ce46cfc675a2</ObjectID>
<CustomerKey>[testExisting_journey_Multistep].[ContactId]</CustomerKey>
<Name>ContactId</Name>
<Scale>0</Scale>
<DefaultValue />
<MaxLength>50</MaxLength>
<IsRequired>true</IsRequired>
<Ordinal>0</Ordinal>
<IsPrimaryKey>true</IsPrimaryKey>
<FieldType>Text</FieldType>
<DataExtension>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<CustomerKey>testExisting_journey_Multistep</CustomerKey>
</DataExtension>
</Results>
<Results xsi:type="DataExtensionField">
<PartnerKey xsi:nil="true" />
<ObjectID>f8c11314-49fc-4e9b-8971-5d6a50705195</ObjectID>
<CustomerKey>[testExisting_journey_Quicksend].[ContactId]</CustomerKey>
<Name>ContactId</Name>
<Scale>0</Scale>
<DefaultValue />
<MaxLength>50</MaxLength>
<IsRequired>true</IsRequired>
<Ordinal>0</Ordinal>
<IsPrimaryKey>true</IsPrimaryKey>
<FieldType>Text</FieldType>
<DataExtension>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<CustomerKey>testExisting_journey_Quicksend</CustomerKey>
</DataExtension>
</Results>
<Results xsi:type="DataExtensionField">
<PartnerKey xsi:nil="true" />
<ObjectID>633ca953-b614-4715-8310-91cdadd085c6</ObjectID>
<CustomerKey>[testExisting_journey_Quicksend].[Email]</CustomerKey>
<Name>Email</Name>
<Scale>0</Scale>
<DefaultValue />
<MaxLength>254</MaxLength>
<IsRequired>true</IsRequired>
<Ordinal>1</Ordinal>
<IsPrimaryKey>false</IsPrimaryKey>
<FieldType>EmailAddress</FieldType>
<DataExtension>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<CustomerKey>testExisting_journey_Quicksend</CustomerKey>
</DataExtension>
</Results>
</RetrieveResponseMsg>
</soap:Body>
</soap:Envelope>
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,45 @@
"publishedInteractionCount": 0,
"automationId": "0fc8f605-bca8-4f24-8b46-b43e06bf271c",
"disableDEDataLogging": false
},
{
"id": "649d512b-4d08-4eca-a14e-fc7b64b4ada8",
"type": "EmailAudience",
"name": "testExisting_journey_Multistep",
"description": "",
"createdDate": "2024-05-04T05:54:44.95",
"createdBy": 700301950,
"modifiedDate": "2024-05-04T05:54:44.95",
"modifiedBy": 700301950,
"mode": "Production",
"eventDefinitionKey": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e",
"dataExtensionId": "ed305df3-6502-ef11-a5c8-5cba2c702db8",
"dataExtensionName": "testExisting_journey_Multistep",
"sourceApplicationExtensionId": "97e942ee-6914-4d3d-9e52-37ecb71f79ed",
"filterDefinitionId": "00000000-0000-0000-0000-000000000000",
"filterDefinitionTemplate": "",
"iconUrl": "/images/icon-data-extension.svg",
"arguments": {
"serializedObjectType": 3,
"eventDefinitionId": "649d512b-4d08-4eca-a14e-fc7b64b4ada8",
"eventDefinitionKey": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e",
"dataExtensionId": "ed305df3-6502-ef11-a5c8-5cba2c702db8",
"criteria": ""
},
"configurationArguments": {
"unconfigured": true
},
"metaData": {
"criteriaDescription": "",
"scheduleState": "No Schedule"
},
"interactionCount": 1,
"isVisibleInPicker": false,
"isPlatformObject": false,
"category": "Audience",
"publishedInteractionCount": 0,
"automationId": "a3c606a8-19d7-4866-8804-5f43dc4502ea",
"disableDEDataLogging": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"count": 2,
"page": 1,
"pageSize": 500,
"links": {},
"items": [
{
"id": "3c3f4112-9b43-43ca-8a89-aa0375b2c1a2",
"key": "c3a4736c-bbaa-e8ab-b61e-7d811bf0898f",
"name": "testExisting_journey_Quicksend",
"lastPublishedDate": "0001-01-01T00:00:00",
"description": "",
"version": 1,
"workflowApiVersion": 1,
"createdDate": "2024-04-24T12:18:43.47",
"modifiedDate": "2024-04-24T12:19:12.803",
"goals": [],
"exits": [],
"notifiers": [],
"stats": {
"currentPopulation": 0,
"cumulativePopulation": 0,
"metGoal": 0,
"metExitCriteria": 0,
"goalPerformance": 0
},
"entryMode": "MultipleEntries",
"definitionType": "Quicksend",
"channel": "email",
"defaults": {
"email": ["{{Event.DEAudience-11be962d-064c-83d9-2804-7d1befc10325.\"Email\"}}"],
"properties": {
"analyticsTracking": {
"enabled": true,
"analyticsType": "google",
"urlDomainsToTrack": []
}
}
},
"metaData": {
"dataSource": "ContactsModel",
"isScheduleSet": true,
"highThroughputSending": {
"email": false
}
},
"executionMode": "Production",
"categoryId": 6298,
"status": "Draft",
"definitionId": "3c3f4112-9b43-43ca-8a89-aa0375b2c1a2",
"scheduledStatus": "Draft"
},
{
"id": "0175b971-71a3-4d8e-98ac-48121f3fbf4f",
"key": "testExisting_journey_Multistep",
"name": "testExisting_journey_Multistep",
"lastPublishedDate": "0001-01-01T00:00:00",
"description": "",
"version": 1,
"workflowApiVersion": 1,
"createdDate": "2024-05-04T05:54:48.027",
"modifiedDate": "2024-05-04T05:54:48.027",
"goals": [],
"exits": [],
"notifiers": [],
"stats": {
"currentPopulation": 0,
"cumulativePopulation": 0,
"metGoal": 0,
"metExitCriteria": 0,
"goalPerformance": 0
},
"entryMode": "NotSet",
"definitionType": "Multistep",
"channel": "",
"defaults": {
"email": ["{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}"],
"properties": {
"analyticsTracking": {
"enabled": true,
"analyticsType": "google",
"urlDomainsToTrack": []
}
}
},
"metaData": {
"dataSource": "ContactsModel",
"highThroughputSending": {
"email": false
}
},
"executionMode": "Production",
"categoryId": 6298,
"status": "Draft",
"definitionId": "0175b971-71a3-4d8e-98ac-48121f3fbf4f",
"scheduledStatus": "Draft"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "0175b971-71a3-4d8e-98ac-48121f3fbf4f",
"key": "ada246f2-dfb8-51d3-a2ce-3622317ea31a",
"key": "testExisting_journey_Multistep",
"name": "testExisting_journey_Multistep",
"lastPublishedDate": "0001-01-01T00:00:00",
"description": "",
Expand Down Expand Up @@ -39,7 +39,7 @@
"description": "my custom description",
"domainExclusions": [],
"dynamicEmailSubject": "testExisting_ email subject",
"emailId": 707139,
"emailId": 531213,
"emailSubject": "testExisting_ email subject",
"exclusionFilter": "",
"isSalesforceTracking": false,
Expand All @@ -49,13 +49,13 @@
"modified": {},
"preHeader": "testExisting_ email preheader",
"priority": 4,
"sendClassificationId": "88d65dda-b8e3-ea11-a2eb-1402ec937095",
"sendClassificationId": "95da425b-a06f-e611-96fe-38eaa7142c61",
"throttleOpens": "1/1/0001 12:00:00 AM",
"throttleCloses": "1/1/0001 12:00:00 AM",
"deliveryProfileId": "163f8417-13f7-e911-a2d8-1402ec938a35",
"senderProfileId": "5a1dfa1f-6402-ef11-a5c8-5cba2c702db8",
"senderProfileId": "a75d452b-7ef4-eb11-b82d-48df37d1da95",
"isTrackingClicks": true,
"publicationListId": 32308
"publicationListId": 15
}
},
"metaData": {
Expand Down Expand Up @@ -310,7 +310,7 @@
}
},
"executionMode": "Production",
"categoryId": 290832,
"categoryId": 6298,
"status": "Draft",
"definitionId": "0175b971-71a3-4d8e-98ac-48121f3fbf4f",
"scheduledStatus": "Draft"
Expand Down
Loading

0 comments on commit 33b0200

Please sign in to comment.