Skip to content

Commit 2ea1ac9

Browse files
authored
Merge pull request #6 from trailheadapps/pozil/flow-fixes
fix: flow test and flow SFCA fixes
2 parents eb7c57d + 77d8deb commit 2ea1ac9

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.github/workflows/ci-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
id: run-code-analyzer
8080
uses: forcedotcom/run-code-analyzer@v2
8181
with:
82-
run-arguments: --workspace "force-app/**" --view detail --output-file "sca-results.csv" --config-file "code-analyzer.yml"
82+
run-arguments: --workspace "force-app/main" --view detail --output-file "sca-results.csv" --config-file "code-analyzer.yml"
8383
results-artifact-name: code-analyzer-results
8484
github-token: ${{ github.token }}
8585

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
id: run-code-analyzer
6363
uses: forcedotcom/run-code-analyzer@v2
6464
with:
65-
run-arguments: --workspace "force-app/**" --view detail --output-file "sca-results.csv" --config-file "code-analyzer.yml"
65+
run-arguments: --workspace "force-app/main" --view detail --output-file "sca-results.csv" --config-file "code-analyzer.yml"
6666
results-artifact-name: code-analyzer-results
6767
github-token: ${{ github.token }}
6868

code-analyzer.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
engines:
1+
rules:
22
flow:
3-
disable_engine: true
3+
# Disabled HardCodedId rule for flow as a temporary workaround for
4+
# https://github.com/forcedotcom/code-analyzer/issues/1947
5+
HardCodedId:
6+
severity: Critical
7+
tags: []
8+
9+
engines:
410
eslint:
511
auto_discover_eslint_config: true
612
disable_javascript_base_config: true

force-app/main/02_actionConfiguration/actionDescriptionOverrides/classes/ActionDescriptionOverridesFlowTest.cls

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ private class ActionDescriptionOverridesFlowTest {
5252
// Set input variables for the flow
5353
Map<String, Object> inputs = new Map<String, Object>();
5454
inputs.put('report_type', 'Sales Report');
55-
inputs.put('start_date', Date.newInstance(2024, 1, 1));
56-
inputs.put('end_date', Date.newInstance(2024, 12, 31));
5755
inputs.put('include_charts', true);
56+
inputs.put('user_id', UserInfo.getUserId());
57+
inputs.put('format', 'PDF');
58+
inputs.put('start_date', '2024-01-01');
59+
inputs.put('end_date', '2024-12-31');
5860

5961
// Run the flow
6062
Test.startTest();

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"url": "git+https://github.com/trailheadapps/agent-script-recipes"
1111
},
1212
"scripts": {
13+
"code-analyzer": "sf code-analyzer run --workspace force-app/main --view detail --output-file \"sca-results.csv\" --config-file \"code-analyzer.yml\"",
1314
"lint": "eslint .",
1415
"test": "npm run test:unit",
1516
"test:unit": "sfdx-lwc-jest",

0 commit comments

Comments
 (0)