-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
325 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...napshots__/verify-md-files.expected/email/emailtest/MarketingProductInquiryResponse.email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Dear {!Lead.Name}, | ||
|
||
Thank you for your inquiry about GenWatt's products. | ||
|
||
A representative will contact you shortly. | ||
|
||
Thanks, | ||
The GenWatt Team |
11 changes: 11 additions & 0 deletions
11
..._/verify-md-files.expected/email/emailtest/MarketingProductInquiryResponse.email-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<EmailTemplate xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<available>true</available> | ||
<description>Standard email response to website product inquiries</description> | ||
<encodingKey>UTF-8</encodingKey> | ||
<name>Marketing: Product Inquiry Response</name> | ||
<style>none</style> | ||
<subject>GenWatt: Thanks for your inquiry</subject> | ||
<type>text</type> | ||
<uiType>Aloha</uiType> | ||
</EmailTemplate> |
28 changes: 28 additions & 0 deletions
28
test/snapshot/sampleProjects/workflow/__snapshots__/verify-md-files.expected/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<types> | ||
<members>emailtest/MarketingProductInquiryResponse</members> | ||
<name>EmailTemplate</name> | ||
</types> | ||
<types> | ||
<members>Account</members> | ||
<name>Workflow</name> | ||
</types> | ||
<types> | ||
<members>Account.emailalert1</members> | ||
<name>WorkflowAlert</name> | ||
</types> | ||
<types> | ||
<members>Account.fieldupdate1</members> | ||
<name>WorkflowFieldUpdate</name> | ||
</types> | ||
<types> | ||
<members>Account.outboundmsg1</members> | ||
<name>WorkflowOutboundMessage</name> | ||
</types> | ||
<types> | ||
<members>Account.task_1</members> | ||
<name>WorkflowTask</name> | ||
</types> | ||
<version>60.0</version> | ||
</Package> |
51 changes: 51 additions & 0 deletions
51
...sampleProjects/workflow/__snapshots__/verify-md-files.expected/workflows/Account.workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<alerts> | ||
<fullName>emailalert1</fullName> | ||
<description>emailalert1</description> | ||
<protected>false</protected> | ||
<recipients> | ||
<recipient>[email protected]</recipient> | ||
<type>user</type> | ||
</recipients> | ||
<senderType>CurrentUser</senderType> | ||
<template>emailtest/MarketingProductInquiryResponse</template> | ||
</alerts> | ||
<fieldUpdates> | ||
<fullName>fieldupdate1</fullName> | ||
<description>this is fieldupdate 1</description> | ||
<field>BillingCountry</field> | ||
<formula>"USA"</formula> | ||
<name>fieldupdate1</name> | ||
<notifyAssignee>false</notifyAssignee> | ||
<operation>Formula</operation> | ||
<protected>false</protected> | ||
</fieldUpdates> | ||
<outboundMessages> | ||
<fullName>outboundmsg1</fullName> | ||
<apiVersion>46.0</apiVersion> | ||
<description>this is outbound message 1</description> | ||
<endpointUrl>https://mobile1.t.salesforce.com/</endpointUrl> | ||
<fields>AccountNumber</fields> | ||
<fields>AccountSource</fields> | ||
<fields>BillingCity</fields> | ||
<fields>Id</fields> | ||
<includeSessionId>false</includeSessionId> | ||
<integrationUser>[email protected]</integrationUser> | ||
<name>outboundmsg1</name> | ||
<protected>false</protected> | ||
<useDeadLetterQueue>false</useDeadLetterQueue> | ||
</outboundMessages> | ||
<tasks> | ||
<fullName>task_1</fullName> | ||
<assignedTo>[email protected]</assignedTo> | ||
<assignedToType>user</assignedToType> | ||
<description>This is task 1.</description> | ||
<dueDateOffset>1</dueDateOffset> | ||
<notifyAssignee>false</notifyAssignee> | ||
<priority>High</priority> | ||
<protected>false</protected> | ||
<status>Not Started</status> | ||
<subject>task 1</subject> | ||
</tasks> | ||
</Workflow> |
8 changes: 8 additions & 0 deletions
8
...les.expected/force-app/main/default/email/emailtest/MarketingProductInquiryResponse.email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Dear {!Lead.Name}, | ||
|
||
Thank you for your inquiry about GenWatt's products. | ||
|
||
A representative will contact you shortly. | ||
|
||
Thanks, | ||
The GenWatt Team |
11 changes: 11 additions & 0 deletions
11
...ted/force-app/main/default/email/emailtest/MarketingProductInquiryResponse.email-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<EmailTemplate xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<available>true</available> | ||
<description>Standard email response to website product inquiries</description> | ||
<encodingKey>UTF-8</encodingKey> | ||
<name>Marketing: Product Inquiry Response</name> | ||
<style>none</style> | ||
<subject>GenWatt: Thanks for your inquiry</subject> | ||
<type>text</type> | ||
<uiType>Aloha</uiType> | ||
</EmailTemplate> |
51 changes: 51 additions & 0 deletions
51
..._/verify-source-files.expected/force-app/main/default/workflows/Account.workflow-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<alerts> | ||
<fullName>emailalert1</fullName> | ||
<description>emailalert1</description> | ||
<protected>false</protected> | ||
<recipients> | ||
<recipient>[email protected]</recipient> | ||
<type>user</type> | ||
</recipients> | ||
<senderType>CurrentUser</senderType> | ||
<template>emailtest/MarketingProductInquiryResponse</template> | ||
</alerts> | ||
<fieldUpdates> | ||
<fullName>fieldupdate1</fullName> | ||
<description>this is fieldupdate 1</description> | ||
<field>BillingCountry</field> | ||
<formula>"USA"</formula> | ||
<name>fieldupdate1</name> | ||
<notifyAssignee>false</notifyAssignee> | ||
<operation>Formula</operation> | ||
<protected>false</protected> | ||
</fieldUpdates> | ||
<outboundMessages> | ||
<fullName>outboundmsg1</fullName> | ||
<apiVersion>46.0</apiVersion> | ||
<description>this is outbound message 1</description> | ||
<endpointUrl>https://mobile1.t.salesforce.com/</endpointUrl> | ||
<fields>AccountNumber</fields> | ||
<fields>AccountSource</fields> | ||
<fields>BillingCity</fields> | ||
<fields>Id</fields> | ||
<includeSessionId>false</includeSessionId> | ||
<integrationUser>[email protected]</integrationUser> | ||
<name>outboundmsg1</name> | ||
<protected>false</protected> | ||
<useDeadLetterQueue>false</useDeadLetterQueue> | ||
</outboundMessages> | ||
<tasks> | ||
<fullName>task_1</fullName> | ||
<assignedTo>[email protected]</assignedTo> | ||
<assignedToType>user</assignedToType> | ||
<description>This is task 1.</description> | ||
<dueDateOffset>1</dueDateOffset> | ||
<notifyAssignee>false</notifyAssignee> | ||
<priority>High</priority> | ||
<protected>false</protected> | ||
<status>Not Started</status> | ||
<subject>task 1</subject> | ||
</tasks> | ||
</Workflow> |
8 changes: 8 additions & 0 deletions
8
...mpleProjects/workflow/originalMdapi/email/emailtest/MarketingProductInquiryResponse.email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Dear {!Lead.Name}, | ||
|
||
Thank you for your inquiry about GenWatt's products. | ||
|
||
A representative will contact you shortly. | ||
|
||
Thanks, | ||
The GenWatt Team |
11 changes: 11 additions & 0 deletions
11
...cts/workflow/originalMdapi/email/emailtest/MarketingProductInquiryResponse.email-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<EmailTemplate xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<available>true</available> | ||
<description>Standard email response to website product inquiries</description> | ||
<encodingKey>UTF-8</encodingKey> | ||
<name>Marketing: Product Inquiry Response</name> | ||
<style>none</style> | ||
<subject>GenWatt: Thanks for your inquiry</subject> | ||
<type>text</type> | ||
<uiType>Aloha</uiType> | ||
</EmailTemplate> |
51 changes: 51 additions & 0 deletions
51
test/snapshot/sampleProjects/workflow/originalMdapi/workflows/Account.workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<alerts> | ||
<fullName>emailalert1</fullName> | ||
<description>emailalert1</description> | ||
<protected>false</protected> | ||
<recipients> | ||
<recipient>[email protected]</recipient> | ||
<type>user</type> | ||
</recipients> | ||
<senderType>CurrentUser</senderType> | ||
<template>emailtest/MarketingProductInquiryResponse</template> | ||
</alerts> | ||
<fieldUpdates> | ||
<fullName>fieldupdate1</fullName> | ||
<description>this is fieldupdate 1</description> | ||
<field>BillingCountry</field> | ||
<formula>"USA"</formula> | ||
<name>fieldupdate1</name> | ||
<notifyAssignee>false</notifyAssignee> | ||
<operation>Formula</operation> | ||
<protected>false</protected> | ||
</fieldUpdates> | ||
<outboundMessages> | ||
<fullName>outboundmsg1</fullName> | ||
<apiVersion>46.0</apiVersion> | ||
<description>this is outbound message 1</description> | ||
<endpointUrl>https://mobile1.t.salesforce.com/</endpointUrl> | ||
<fields>AccountNumber</fields> | ||
<fields>AccountSource</fields> | ||
<fields>BillingCity</fields> | ||
<fields>Id</fields> | ||
<includeSessionId>false</includeSessionId> | ||
<integrationUser>[email protected]</integrationUser> | ||
<name>outboundmsg1</name> | ||
<protected>false</protected> | ||
<useDeadLetterQueue>false</useDeadLetterQueue> | ||
</outboundMessages> | ||
<tasks> | ||
<fullName>task_1</fullName> | ||
<assignedTo>[email protected]</assignedTo> | ||
<assignedToType>user</assignedToType> | ||
<description>This is task 1.</description> | ||
<dueDateOffset>1</dueDateOffset> | ||
<notifyAssignee>false</notifyAssignee> | ||
<priority>High</priority> | ||
<protected>false</protected> | ||
<status>Not Started</status> | ||
<subject>task 1</subject> | ||
</tasks> | ||
</Workflow> |
30 changes: 30 additions & 0 deletions
30
test/snapshot/sampleProjects/workflow/originalMdapi/workflows/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<fullName>pkg3</fullName> | ||
<types> | ||
<members>emailtest</members> | ||
<members>emailtest/MarketingProductInquiryResponse</members> | ||
<name>EmailTemplate</name> | ||
</types> | ||
<types> | ||
<members>Account.emailalert1</members> | ||
<name>WorkflowAlert</name> | ||
</types> | ||
<types> | ||
<members>Account.fieldupdate1</members> | ||
<name>WorkflowFieldUpdate</name> | ||
</types> | ||
<types> | ||
<members>Account.outboundmsg1</members> | ||
<name>WorkflowOutboundMessage</name> | ||
</types> | ||
<types> | ||
<members>Account.task_1</members> | ||
<name>WorkflowTask</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>Workflow</name> | ||
</types> | ||
<version>60.0</version> | ||
</Package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "workflowProject", | ||
"namespace": "", | ||
"packageDirectories": [ | ||
{ | ||
"default": true, | ||
"path": "force-app" | ||
} | ||
], | ||
"sfdcLoginUrl": "https://login.salesforce.com", | ||
"sourceApiVersion": "52.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2023, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
import * as fs from 'node:fs'; | ||
import * as path from 'node:path'; | ||
import { dirsAreIdentical, fileSnap, mdapiToSource, sourceToMdapi } from '../../helper/conversions'; | ||
|
||
// we don't want failing tests outputting over each other | ||
/* eslint-disable no-await-in-loop */ | ||
|
||
describe('Workflow and children', () => { | ||
const testDir = path.join('test', 'snapshot', 'sampleProjects', 'workflow'); | ||
let sourceFiles: string[]; | ||
let mdFiles: string[]; | ||
|
||
before(async () => { | ||
await fs.promises.mkdir(path.join(testDir, 'force-app'), { recursive: true }); | ||
sourceFiles = await mdapiToSource(testDir); | ||
mdFiles = await sourceToMdapi(testDir); | ||
}); | ||
it('verify source files', async () => { | ||
for (const file of sourceFiles) { | ||
await fileSnap(file, testDir); | ||
} | ||
dirsAreIdentical( | ||
path.join(testDir, 'force-app'), | ||
path.join(testDir, '__snapshots__', 'verify-source-files.expected', 'force-app') | ||
); | ||
}); | ||
it('verify md files', async () => { | ||
for (const file of mdFiles) { | ||
await fileSnap(file, testDir); | ||
} | ||
}); | ||
|
||
after(async () => { | ||
await Promise.all([ | ||
fs.promises.rm(path.join(testDir, 'force-app'), { recursive: true, force: true }), | ||
fs.promises.rm(path.join(testDir, 'mdapiOutput'), { recursive: true, force: true }), | ||
]); | ||
}); | ||
}); |
1a1b3b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
eda-componentSetCreate-linux
214
ms233
ms0.92
eda-sourceToMdapi-linux
2017
ms2004
ms1.01
eda-sourceToZip-linux
1717
ms1650
ms1.04
eda-mdapiToSource-linux
2938
ms3083
ms0.95
lotsOfClasses-componentSetCreate-linux
378
ms387
ms0.98
lotsOfClasses-sourceToMdapi-linux
3592
ms3546
ms1.01
lotsOfClasses-sourceToZip-linux
2765
ms2730
ms1.01
lotsOfClasses-mdapiToSource-linux
3345
ms3479
ms0.96
lotsOfClassesOneDir-componentSetCreate-linux
624
ms641
ms0.97
lotsOfClassesOneDir-sourceToMdapi-linux
6393
ms6231
ms1.03
lotsOfClassesOneDir-sourceToZip-linux
5422
ms5210
ms1.04
lotsOfClassesOneDir-mdapiToSource-linux
6344
ms6154
ms1.03
This comment was automatically generated by workflow using github-action-benchmark.
1a1b3b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
eda-componentSetCreate-win32
401
ms402
ms1.00
eda-sourceToMdapi-win32
3441
ms3481
ms0.99
eda-sourceToZip-win32
2486
ms2555
ms0.97
eda-mdapiToSource-win32
5697
ms5996
ms0.95
lotsOfClasses-componentSetCreate-win32
888
ms943
ms0.94
lotsOfClasses-sourceToMdapi-win32
7600
ms7647
ms0.99
lotsOfClasses-sourceToZip-win32
4882
ms4863
ms1.00
lotsOfClasses-mdapiToSource-win32
7468
ms7381
ms1.01
lotsOfClassesOneDir-componentSetCreate-win32
1478
ms1471
ms1.00
lotsOfClassesOneDir-sourceToMdapi-win32
13883
ms13627
ms1.02
lotsOfClassesOneDir-sourceToZip-win32
8536
ms8312
ms1.03
lotsOfClassesOneDir-mdapiToSource-win32
13527
ms13435
ms1.01
This comment was automatically generated by workflow using github-action-benchmark.