Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
environment: ${{ needs.determine-environment.outputs.environment_name }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -46,6 +46,7 @@ jobs:
REQUIRED_PARAMS=(
"/zipcase/portal_url"
"/zipcase/portal_case_url"
"/zipcase/portal_dashboard_path"
"/zipcase/cognito/user_pool_id"
"/zipcase/cognito/app_client_id"
"/zipcase/alert-email"
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
terraform_version: '1.11.4'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -156,7 +157,7 @@ jobs:
run: npm ci

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/manual-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
environment: ${{ github.event.inputs.environment }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -54,6 +54,7 @@ jobs:
REQUIRED_PARAMS=(
"/zipcase/portal_url"
"/zipcase/portal_case_url"
"/zipcase/portal_dashboard_path"
"/zipcase/cognito/user_pool_id"
"/zipcase/cognito/app_client_id"
)
Expand Down Expand Up @@ -94,7 +95,7 @@ jobs:
terraform_version: '1.11.4'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -171,7 +172,7 @@ jobs:
run: npm ci

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
terraform_version: '1.11.4'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
terraform_version: '1.11.4'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
84 changes: 52 additions & 32 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"overrides": {
"flatted": "^3.4.2",
"glob": "^10.5.0",
"lodash": "^4.18.1",
"minimatch": "^9.0.9"
},
"dependencies": {
Expand Down Expand Up @@ -57,7 +58,7 @@
"tailwindcss": "^4.0.9",
"typescript": "~5.7.2",
"typescript-eslint": "^8.22.0",
"vite": "^6.1.1",
"vite": "^6.4.2",
"vitest": "^3.1.3"
}
}
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""
},
"overrides": {
"lodash": "^4.18.1"
},
"keywords": [],
"author": "Code with Asheville",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions serverless/api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ provider:
CASE_DATA_QUEUE_URL: ${cf:infra-${self:provider.stage}.CaseDataQueueUrl}
PORTAL_URL: ${ssm:/zipcase/portal_url}
PORTAL_CASE_URL: ${ssm:/zipcase/portal_case_url}
PORTAL_DASHBOARD_PATH: ${ssm:/zipcase/portal_dashboard_path}
iam:
role:
statements:
Expand Down
23 changes: 22 additions & 1 deletion serverless/app/handlers/__tests__/case.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ import CaseProcessor from '../../../lib/CaseProcessor';
jest.mock('../../../lib/StorageClient');
jest.mock('../../../lib/PortalAuthenticator');
jest.mock('../../../lib/QueueClient');
jest.mock('../../../lib/CaseProcessor');
jest.mock('../../../lib/CaseProcessor', () => {
const actual = jest.requireActual('../../../lib/CaseProcessor');

return {
__esModule: true,
...actual,
default: {
...actual.default,
processCaseData: jest.fn(),
},
};
});

// Mock event with auth context
const createEvent = (pathParams?: any, userId = 'test-user-id') => ({
Expand All @@ -25,8 +36,18 @@ const createEvent = (pathParams?: any, userId = 'test-user-id') => ({
});

describe('case handler', () => {
let logSpy: jest.SpyInstance;
let errorSpy: jest.SpyInstance;

beforeEach(() => {
jest.clearAllMocks();
logSpy = jest.spyOn(console, 'log').mockImplementation(() => undefined);
errorSpy = jest.spyOn(console, 'error').mockImplementation(() => undefined);
});

afterEach(() => {
logSpy.mockRestore();
errorSpy.mockRestore();
});

describe('get function', () => {
Expand Down
1 change: 1 addition & 0 deletions serverless/app/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ provider:
DEFAULT_USAGE_PLAN_ID: ${cf:api-${self:provider.stage}.TestUsagePlanId}
PORTAL_URL: ${ssm:/zipcase/portal_url}
PORTAL_CASE_URL: ${ssm:/zipcase/portal_case_url}
PORTAL_DASHBOARD_PATH: ${ssm:/zipcase/portal_dashboard_path}
UPLOADS_BUCKET: ${ssm:/zipcase/uploads_bucket}
iam:
role:
Expand Down
Loading
Loading