diff --git a/test/integrations/destinations/june/processor/data.ts b/test/integrations/destinations/june/processor/data.ts index 5a469a43ad..dfe35ed0a3 100644 --- a/test/integrations/destinations/june/processor/data.ts +++ b/test/integrations/destinations/june/processor/data.ts @@ -623,4 +623,133 @@ export const data = [ }, }, }, + { + name: 'june', + description: 'should fail for alias message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: '93EMyDLvfpbRxxYn', + }, + ID: 'june123', + }, + message: { + type: 'alias', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type "alias" is not supported', + statTags: { + destType: 'JUNE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'june', + description: 'should transform for page event with fully populated properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: '93EMyDLvfpbRxxYn', + }, + ID: 'june123', + }, + message: { + type: 'page', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.june.so/api/page', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic 93EMyDLvfpbRxxYn', + }, + params: {}, + body: { + JSON: { + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, ];