Skip to content

Commit 8810678

Browse files
RRanathccbc-service-account
authored andcommitted
chore: remove info and error hints from dependencies in summary
1 parent f3f13e4 commit 8810678

File tree

3 files changed

+6
-40
lines changed

3 files changed

+6
-40
lines changed

.github/workflows/scorecards.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
schedule:
66
- cron: '31 20 * * 4'
77
push:
8-
branches: [ "main" ]
8+
branches: ['main']
99

1010
# Declare default permissions as read only.
1111
permissions: read-all
@@ -24,12 +24,12 @@ jobs:
2424
actions: read
2525

2626
steps:
27-
- name: "Checkout code"
27+
- name: 'Checkout code'
2828
uses: actions/checkout@v4 # tag=v3.0.0
2929
with:
3030
persist-credentials: false
3131

32-
- name: "Run analysis"
32+
- name: 'Run analysis'
3333
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # tag=v2.4.0
3434
with:
3535
results_file: results.sarif
@@ -48,15 +48,15 @@ jobs:
4848

4949
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5050
# format to the repository Actions tab.
51-
- name: "Upload artifact"
51+
- name: 'Upload artifact'
5252
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # tag=v4.5.0
5353
with:
5454
name: SARIF file
5555
path: results.sarif
5656
retention-days: 5
5757

5858
# Upload the results to GitHub's code scanning dashboard.
59-
- name: "Upload to code-scanning"
59+
- name: 'Upload to code-scanning'
6060
uses: github/codeql-action/upload-sarif@429e1977040da7a23b6822b13c129cd1ba93dbb2 # tag=v3.26.2
6161
with:
6262
sarif_file: results.sarif

app/lib/helpers/ccbcSummaryGenerateFormData.tsx

-34
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ const getRegionalDistricts = (regionalDistricts) => {
2222
return rds;
2323
};
2424

25-
const findTechnicalAssessment = (assessments) => {
26-
return assessments.nodes.find(
27-
(assessment) => assessment.assessmentDataType === 'technical'
28-
);
29-
};
30-
3125
const handleApplicationDateReceived = (applicationData, allIntakes) => {
3226
// keep blank for hidden intakes
3327
if (applicationData.intakeNumber === 99) {
@@ -601,10 +595,6 @@ const generateFormData = (
601595
errors = sowSummaryData.errors;
602596
}
603597

604-
const technicalAssessment = findTechnicalAssessment(
605-
applicationData.allAssessments
606-
);
607-
const techAssessmentProgress = technicalAssessment?.jsonData?.nextStep;
608598
return {
609599
// dependency is one source
610600
formData: {
@@ -641,30 +631,6 @@ const generateFormData = (
641631
errors: {
642632
...errors,
643633
...formData?.errors,
644-
dependency: {
645-
connectedCoastNetworkDependent: {
646-
__errors: [
647-
techAssessmentProgress
648-
? `Assessment progress is "${techAssessmentProgress}"`
649-
: null,
650-
],
651-
errorColor: '#FFF',
652-
errorTextColor:
653-
dependencyData?.connectedCoastNetworkDependent === 'TBD'
654-
? '#676666'
655-
: null,
656-
},
657-
crtcProjectDependent: {
658-
__errors: [
659-
techAssessmentProgress
660-
? `Assessment progress is "${techAssessmentProgress}"`
661-
: null,
662-
],
663-
errorColor: '#FFF',
664-
errorTextColor:
665-
dependencyData?.crtcProjectDependent === 'TBD' ? '#676666' : null,
666-
},
667-
},
668634
},
669635
};
670636
};

app/tests/pages/analyst/application/[applicationId]/summary.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ describe('The Summary page', () => {
11591159

11601160
expect(screen.queryAllByText('(SOW)')).toHaveLength(0);
11611161
const alerts = screen.getAllByTestId('styled-alert');
1162-
expect(alerts).toHaveLength(5);
1162+
expect(alerts).toHaveLength(4);
11631163

11641164
fireEvent.mouseOver(alerts[1]);
11651165
expect(

0 commit comments

Comments
 (0)