Skip to content

Commit

Permalink
chore: remove info and error hints from dependencies in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
RRanath authored and ccbc-service-account committed Jan 3, 2025
1 parent 165d5bd commit e8b5056
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 40 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
schedule:
- cron: '31 20 * * 4'
push:
branches: [ "main" ]
branches: ['main']

# Declare default permissions as read only.
permissions: read-all
Expand All @@ -24,12 +24,12 @@ jobs:
actions: read

steps:
- name: "Checkout code"
- name: 'Checkout code'
uses: actions/checkout@v4 # tag=v3.0.0
with:
persist-credentials: false

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

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

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@429e1977040da7a23b6822b13c129cd1ba93dbb2 # tag=v3.26.2
with:
sarif_file: results.sarif
34 changes: 0 additions & 34 deletions app/lib/helpers/ccbcSummaryGenerateFormData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const getRegionalDistricts = (regionalDistricts) => {
return rds;
};

const findTechnicalAssessment = (assessments) => {
return assessments.nodes.find(
(assessment) => assessment.assessmentDataType === 'technical'
);
};

const handleApplicationDateReceived = (applicationData, allIntakes) => {
// keep blank for hidden intakes
if (applicationData.intakeNumber === 99) {
Expand Down Expand Up @@ -601,10 +595,6 @@ const generateFormData = (
errors = sowSummaryData.errors;
}

const technicalAssessment = findTechnicalAssessment(
applicationData.allAssessments
);
const techAssessmentProgress = technicalAssessment?.jsonData?.nextStep;
return {
// dependency is one source
formData: {
Expand Down Expand Up @@ -641,30 +631,6 @@ const generateFormData = (
errors: {
...errors,
...formData?.errors,
dependency: {
connectedCoastNetworkDependent: {
__errors: [
techAssessmentProgress
? `Assessment progress is "${techAssessmentProgress}"`
: null,
],
errorColor: '#FFF',
errorTextColor:
dependencyData?.connectedCoastNetworkDependent === 'TBD'
? '#676666'
: null,
},
crtcProjectDependent: {
__errors: [
techAssessmentProgress
? `Assessment progress is "${techAssessmentProgress}"`
: null,
],
errorColor: '#FFF',
errorTextColor:
dependencyData?.crtcProjectDependent === 'TBD' ? '#676666' : null,
},
},
},
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ describe('The Summary page', () => {

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

fireEvent.mouseOver(alerts[1]);
expect(
Expand Down

0 comments on commit e8b5056

Please sign in to comment.