Skip to content

Commit ecbade0

Browse files
authored
Merge pull request #9 from jdschleicher/feature/snowfakery-integration
Feature/snowfakery integration
2 parents 20d84cb + 3001396 commit ecbade0

File tree

22 files changed

+2303
-181
lines changed

22 files changed

+2303
-181
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ name: Run JESTS on PUSH
22

33
on:
44
push:
5-
pull_request:
5+
pull_request:
66

77
jobs:
88

99
Compile-and-Test-Salesforce-Data-Treecipe:
1010

11+
if: github.event.pull_request.draft == false
12+
1113
runs-on: ubuntu-latest
1214

1315
steps:
16+
1417
- name: Checkout Current Repository
1518
uses: actions/checkout@v4
1619

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
{
2020
"label": "CUSTOM: CREATE SUMMARY FILES - CLEAN JEST TESTS RUN AND CREATE TEST SUMMARY FILES IN 'coverage' FOLDER",
2121
"type": "shell",
22-
"command": "pwsh ./developmentSupportAndScripts/resetAndInitiateJestCoverageTest.ps1",
22+
"command": "pwsh ./developmentSupportScripts/resetAndInitiateJestCoverageTest.ps1",
2323
"problemMatcher": []
2424
},
2525
{
2626
"label": "CUSTOM: OPEN JEST IN BROWSER - CLEAN JEST TESTS AND OPEN COVERAGE REPORT IN BROWSER",
2727
"type": "shell",
28-
"command": "pwsh ./developmentSupportAndScripts/resetAndRunCoverageReport.ps1",
28+
"command": "pwsh ./developmentSupportScripts/resetAndRunCoverageReport.ps1",
2929
"problemMatcher": []
3030
},
3131
]

developmentSupportAndScripts/resetAndInitiateJestCoverageTest.ps1 renamed to developmentSupportScripts/resetAndInitiateJestCoverageTest.ps1

File renamed without changes.

developmentSupportAndScripts/resetAndRunCoverageReport.ps1 renamed to developmentSupportScripts/resetAndRunCoverageReport.ps1

File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
function
3+
4+
5+
snowfakery treecipe/GeneratedRecipes/recipe-2025-01-03T15-45-06.yaml --output-format json --output-file 'thisname.json' --output-folder .
6+
7+
8+
snowfakery treecipe/GeneratedRecipes/recipe-2025-01-03T15-45-06.yaml --output-format json --output-file 'thisname.csv' --output-folder .
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[
2+
{
3+
"attributes": {
4+
"type": "Account",
5+
"referenceId": "Account_Reference_1"
6+
},
7+
"Name": "Gardner Group"
8+
},
9+
{
10+
"attributes": {
11+
"type": "Account",
12+
"referenceId": "Account_Reference_2"
13+
},
14+
"Name": "Hogan, Hurley and Friedman"
15+
},
16+
{
17+
"attributes": {
18+
"type": "Account",
19+
"referenceId": "Account_Reference_3"
20+
},
21+
"Name": "Bishop-Reynolds"
22+
},
23+
{
24+
"attributes": {
25+
"type": "Account",
26+
"referenceId": "Account_Reference_4"
27+
},
28+
"Name": "Clay-Boyd"
29+
},
30+
{
31+
"attributes": {
32+
"type": "Account",
33+
"referenceId": "Account_Reference_5"
34+
},
35+
"Name": "Hester and Sons"
36+
},
37+
{
38+
"attributes": {
39+
"type": "Account",
40+
"referenceId": "Account_Reference_6"
41+
},
42+
"Name": "Atkins, Poole and Horton"
43+
},
44+
{
45+
"attributes": {
46+
"type": "Account",
47+
"referenceId": "Account_Reference_7"
48+
},
49+
"Name": "Barry-Castaneda"
50+
},
51+
{
52+
"attributes": {
53+
"type": "Account",
54+
"referenceId": "Account_Reference_8"
55+
},
56+
"Name": "Potts, Henderson and Mason"
57+
},
58+
{
59+
"attributes": {
60+
"type": "Account",
61+
"referenceId": "Account_Reference_9"
62+
},
63+
"Name": "Oconnell Group"
64+
},
65+
{
66+
"attributes": {
67+
"type": "Account",
68+
"referenceId": "Account_Reference_10"
69+
},
70+
"Name": "Higgins-Summers"
71+
},
72+
{
73+
"attributes": {
74+
"type": "Account",
75+
"referenceId": "Account_Reference_11"
76+
},
77+
"Name": "Galloway-Garrett"
78+
},
79+
{
80+
"attributes": {
81+
"type": "Example_Everything__c",
82+
"referenceId": "Example_Everything__c_Reference_1"
83+
},
84+
"Checkbox__c": "False",
85+
"Currency__c": 684760.56,
86+
"DateTime__c": "2024-08-31 22:05:29.492480+00:00",
87+
"Date__c": "2024-01-17",
88+
"DependentPicklist__c": "weed",
89+
"Email__c": "[email protected]",
90+
"Example_Everything_Lookup__c": "TODO -- REFERENCE ID REQUIRED",
91+
"Formula__c": 902298,
92+
"MultiPicklist__c": "chorizo;egg;chicken;steak;fish;pork",
93+
"Number__c": 184963,
94+
"Percent__c": 22.46,
95+
"Phone__c": "+1-247-967-5518",
96+
"Picklist__c": "willoughby",
97+
"Text_Area_Long__c": "Road travel meeting hour. Cause husband herself stock example with. Above mission firm.\nThree military debate. Including air own politics. Test board coach note high. Game fall night design sign public dream.\nShoulder beyond look investment technology character over. Lead court character determine hear.\nWhere kind step arm. Customer staff economy reduce listen marriage fly. You travel study mind wall offer spend plan.\nDifficult final people picture see network. Meet letter community work. Approach everything forget through none else.\nNation almost deal even. Manage under production site country. Though least care great story star back.\nGreat maintain energy decade material develop piece. For international spring hundred almost bank girl.\nBoy rock hit area movement. Project something from future even newspaper.\nDirection president weight fish behind newspaper. Probably right plan value only good international. Alone difference bill order make sure side.",
98+
"Text__c": "Future visit go deep medical doctor.",
99+
"Time__c": "01:51:50",
100+
"Url__c": "http://www.pace.com/"
101+
}
102+
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[{"_table": "Account", "id": 1, "Name": "Johnson, Hardy and Massey"},
2+
{"_table": "Account", "id": 2, "Name": "Sosa, Peck and Keith"},
3+
{"_table": "Account", "id": 3, "Name": "Rhodes Ltd"},
4+
{"_table": "Account", "id": 4, "Name": "Golden-Best"},
5+
{"_table": "Account", "id": 5, "Name": "Eaton-Burgess"},
6+
{"_table": "Account", "id": 6, "Name": "Vaughan Inc"},
7+
{"_table": "Account", "id": 7, "Name": "Mora-Knight"},
8+
{"_table": "Account", "id": 8, "Name": "Williamson-Juarez"},
9+
{"_table": "Account", "id": 9, "Name": "Lam-Stuart"},
10+
{"_table": "Account", "id": 10, "Name": "Massey-Stuart"},
11+
{"_table": "Account", "id": 11, "Name": "Yang and Sons"},
12+
{"_table": "Example_Everything__c", "id": 1, "Checkbox__c": "True", "Currency__c": 688091.64, "DateTime__c": "2024-08-19 12:23:20.517881+00:00", "Date__c": "2024-07-21", "DependentPicklist__c": "rocks", "Email__c": "[email protected]", "Example_Everything_Lookup__c": "TODO -- REFERENCE ID REQUIRED", "Formula__c": 524051, "MultiPicklist__c": "steak;tofu;fish;egg", "Number__c": 287629, "Percent__c": 73.12, "Phone__c": "001-724-408-2539x71333", "Picklist__c": "wickliffe", "TextAreaRich__c": "Second several education teach. Message conference firm everyone claim member.\nPay group under be. Baby support economy hotel suggest guess.\nAround hand enough difficult money why material discover. Friend production have report benefit.\nLand series thank station discuss traditional give. Health ability task beautiful choice by learn general. Weight which blood.\nNight guy explain system seven find. Knowledge agency should want. Director store wonder mouth table.\nSafe begin benefit.\nData yeah project.\nCell education matter level. Themselves manage young cut fight girl while successful. Remain student trial.\nWeight sound letter capital fight there best. Prepare maintain turn continue cost. Small along action hot growth.\nMoney play claim wall this. Mission part painting end character challenge address. Doctor true country hit stock improve.\nLead own reflect. Economy rock create bill final everything. Region knowledge minute writer.", "Text_Area_Long__c": "Beautiful have goal including others. Store machine reach lay glass. Drop news market exist price many exactly.\nUnder ask usually prevent yourself alone. Manage song simple true father similar.\nLet western compare station dog. Father generation maybe whom husband type. Speech miss possible simply economic old.\nCultural system unit consumer bed candidate boy true. Network number able war later tend doctor.\nLaw arrive final. Total third travel bad above later create.\nBlood perhaps source wish pressure activity. Market never truth reflect and now level. On care finally beautiful human.\nSound region both wife senior. Her feel southern single stuff probably structure. Election tell job moment story staff business.\nWork together clear sport option. Take set including point remember behavior. Long range bad camera relate month.\nCoach material sing nation loss partner job whose. Ahead upon organization red. Case guy edge away decade.", "Text__c": "Fact sea for fund over. Economy finish thought.", "Time__c": "09:11:19", "Url__c": "https://welch.org/"}]
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
2+
- object: Account
3+
nickname: Account_NickName
4+
count: 11
5+
fields:
6+
Name: ${{ fake.company() }}
7+
8+
- object: Example_Everything__c
9+
nickname: Example_Everything__c_NickName
10+
count: 1
11+
fields:
12+
Checkbox__c: ${{fake.boolean()}}
13+
Currency__c: ${{fake.pydecimal(left_digits=6, right_digits=2, positive=True)}}
14+
DateTime__c: ${{fake.date_time_between(start_date="-1y", end_date="now")}}
15+
Date__c: ${{date(fake.date_between(start_date="-1y", end_date="today"))}}
16+
DependentPicklist__c:
17+
if:
18+
- choice:
19+
when: ${{ Picklist__c == 'cle' }}
20+
pick:
21+
random_choice:
22+
- tree
23+
- weed
24+
- mulch
25+
- rocks
26+
- choice:
27+
when: ${{ Picklist__c == 'eastlake' }}
28+
pick:
29+
random_choice:
30+
- tree
31+
- weed
32+
- mulch
33+
- choice:
34+
when: ${{ Picklist__c == 'madison' }}
35+
pick:
36+
random_choice:
37+
- tree
38+
- plant
39+
- weed
40+
- choice:
41+
when: ${{ Picklist__c == 'willoughby' }}
42+
pick:
43+
random_choice:
44+
- tree
45+
- weed
46+
- mulch
47+
- choice:
48+
when: ${{ Picklist__c == 'mentor' }}
49+
pick:
50+
random_choice:
51+
- plant
52+
- weed
53+
- choice:
54+
when: ${{ Picklist__c == 'wickliffe' }}
55+
pick:
56+
random_choice:
57+
- weed
58+
- rocks
59+
Email__c: ${{fake.email()}}
60+
Example_Everything_Lookup__c: "TODO -- REFERENCE ID REQUIRED"
61+
Formula__c: ${{fake.random_int(min=0, max=999999)}}
62+
MultiPicklist__c: ${{ (';').join((fake.random_sample(elements=('chicken','chorizo','egg','fish','pork','steak','tofu')))) }}
63+
Number__c: ${{fake.random_int(min=0, max=999999)}}
64+
Percent__c: ${{fake.pydecimal(left_digits=2, right_digits=2, positive=True)}}
65+
Phone__c: ${{fake.phone_number()}}
66+
Picklist__c: ${{ random_choice('cle','eastlake','madison','mentor','wickliffe','willoughby') }}
67+
TextAreaRich__c: ${{fake.text(max_nb_chars=1000)}}
68+
Text_Area_Long__c: ${{fake.text(max_nb_chars=1000)}}
69+
Text__c: ${{fake.text(max_nb_chars=50)}}
70+
Time__c: ${{fake.time()}}
71+
Url__c: ${{fake.url()}}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"salesforceObjectsPath": "./force-app/main/default/objects/",
3+
"dataFakerService": "snowfakery"
4+
}

images/datatreecipe.webp

375 KB
Loading

0 commit comments

Comments
 (0)