Skip to content
Closed
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
3d0a4f7
Add file publication viewing with PDF and data file support
alexbottenberg Nov 12, 2025
dd5b887
Fix E2E tests for file publication and summary pages
alexbottenberg Nov 12, 2025
d23ef92
Refactor: Extract error content to separate locale files
alexbottenberg Nov 13, 2025
2571328
Fix UUID type mismatch in E2E tests
alexbottenberg Nov 13, 2025
a1692c9
Fix file storage path to use repository root
alexbottenberg Nov 13, 2025
233e174
Fix test CSS selector and remove debug logging
alexbottenberg Nov 13, 2025
02b1cef
Fix unit tests for file-storage module
alexbottenberg Nov 13, 2025
6af8055
Fix Welsh error content test selector
alexbottenberg Nov 13, 2025
b864e56
Fix 404 error page test selector
alexbottenberg Nov 13, 2025
185a730
Fix page title assertion in PDF iframe test
alexbottenberg Nov 13, 2025
379beb9
Fix performance test to use request API
alexbottenberg Nov 13, 2025
c05bb16
Fix E2E tests: use request API for download endpoints
alexbottenberg Nov 13, 2025
73c7ce1
Fix language variant tests to use request API
alexbottenberg Nov 13, 2025
cff59f1
Fix Welsh date format test
alexbottenberg Nov 13, 2025
4cc6b0a
Fix octet-stream test to use request API
alexbottenberg Nov 13, 2025
20f0c81
Fix JSON content-type test to use request API
alexbottenberg Nov 13, 2025
7da0321
Fix PDF file tests to use request API
alexbottenberg Nov 13, 2025
8e6ff4b
Fix page title test assertion
alexbottenberg Nov 13, 2025
fd150f2
Refactor file storage to publication module
alexbottenberg Nov 17, 2025
7a6fe6b
Merge branch 'master' into VIBE-215-Display-of-Pubs-View-Flat-File
alexbottenberg Nov 17, 2025
a2168a3
Refactor artefact-not-found into dedicated page folder
alexbottenberg Nov 17, 2025
5ed5c0d
Fix helmet CSP frameSrc to always include 'self'
alexbottenberg Nov 17, 2025
56ae8fe
Force reload of helmet middleware for test cache
alexbottenberg Nov 17, 2025
10a5633
Rename local variable to avoid shadowing in getExpireDate
alexbottenberg Nov 17, 2025
a09c92d
Fix linter issues: formatting and false positive
alexbottenberg Nov 17, 2025
b55cc44
Add e2e-tests junit-results.xml to gitignore
alexbottenberg Nov 18, 2025
821ffee
Refactor file-publication controller and add unit tests
alexbottenberg Nov 18, 2025
95514a6
Fix E2E test workflow to handle missing junit-results.xml
alexbottenberg Nov 18, 2025
b6bf34c
Fix glob security vulnerabilities (GHSA-5j98-mcp5-4vw2)
alexbottenberg Nov 18, 2025
881eb83
Fix E2E test for file-publication redirect behavior
alexbottenberg Nov 18, 2025
96b9c66
Fix import ordering in artefact-not-found test
alexbottenberg Nov 18, 2025
2018cee
Add media account creation feature with comprehensive E2E tests
alexbottenberg Nov 19, 2025
3065e79
Add CHECK constraint to media_application status field
alexbottenberg Nov 19, 2025
a269d13
Improve multer error handling for all file upload errors
alexbottenberg Nov 19, 2025
a3fcf82
Improve JSON download test assertions in file-publication E2E test
alexbottenberg Nov 19, 2025
354c614
Fix storage path and date sorting assertions in summary-of-publicatio…
alexbottenberg Nov 19, 2025
6d931c5
Fix stray leading quote in Welsh translation for account-request-subm…
alexbottenberg Nov 19, 2025
6a934d3
Fix page titles in create-media-account to reflect correct account type
alexbottenberg Nov 19, 2025
b108acb
Fix duplicate file upload errors by filtering existing field errors b…
alexbottenberg Nov 20, 2025
b29e54d
Fix case-sensitive file extension detection in file-publication-data
alexbottenberg Nov 20, 2025
4f5963f
Increase CSRF token entropy from 32 to 128 bytes for better security
alexbottenberg Nov 20, 2025
8e79715
Update page titles to follow GOV.UK standard format with full service…
alexbottenberg Nov 20, 2025
2b5691b
Update Welsh translation for openingParagraph2 in create-media-account
alexbottenberg Nov 20, 2025
1582ba2
Update Welsh idProofHint translation in create-media-account
alexbottenberg Nov 20, 2025
ee0e0fb
Improve error messages and translations in create-media-account
alexbottenberg Nov 20, 2025
0bfacdd
Add csrf-sync dependency to apps/web to satisfy peer dependency
alexbottenberg Nov 20, 2025
6322d7f
Use optional chaining for res.locals.locale access
alexbottenberg Nov 20, 2025
85823d5
Add defensive runtime check for req.file before accessing properties
alexbottenberg Nov 20, 2025
70ae985
Prevent orphaned files by updating DB before writing file
alexbottenberg Nov 20, 2025
b624619
Improve type safety for fileUploadError handling in manual-upload
alexbottenberg Nov 20, 2025
5d8ff07
Merge branch 'master' into VIBE-175
alexbottenberg Nov 20, 2025
10de8f3
Remove csrf-sync from root dependencies
alexbottenberg Nov 20, 2025
aec303f
Remove dead code in multer error handling
alexbottenberg Nov 20, 2025
6c353ac
Add missing configureCsrf mock to web app tests
alexbottenberg Nov 20, 2025
2d8dc60
Add missing CSRF tokens to all POST forms
alexbottenberg Nov 20, 2025
ece4aca
Fix CFT IDAM E2E tests to wait for navigation after form submission
alexbottenberg Nov 20, 2025
302a07d
Improve CFT IDAM helper to handle /cft-login redirect timing
alexbottenberg Nov 20, 2025
412e591
Fix CFT IDAM session E2E tests to wait for navigation
alexbottenberg Nov 20, 2025
40916cb
Improve test coverage for apps/web/src/app.ts to meet 80% threshold
alexbottenberg Nov 20, 2025
9ad3527
Add test to verify configureCsrf middleware is invoked
alexbottenberg Nov 20, 2025
f60ff77
Fix multer error handling tests to actually invoke middleware
alexbottenberg Nov 20, 2025
e398146
Fix sign-in E2E test to use correct create account link text
alexbottenberg Nov 20, 2025
7fe7a6d
Fix remaining sign-in E2E tests to use correct link text
alexbottenberg Nov 20, 2025
f5be775
Fix Welsh language test to use correct Welsh translations
alexbottenberg Nov 20, 2025
38e2689
Simplify multer error handling tests
alexbottenberg Nov 20, 2025
1fd651e
Remove failing POST route tests and add documentation
alexbottenberg Nov 20, 2025
45db934
Fix admin-dashboard E2E test timeout by moving beforeEach hooks
alexbottenberg Nov 20, 2025
43e6388
Fix create-media-account E2E test navigation timing
alexbottenberg Nov 20, 2025
4fc31f3
Fix screen reader E2E test to use correct error message text
alexbottenberg Nov 20, 2025
bd8272f
Fix Welsh error message in create-media-account test
alexbottenberg Nov 20, 2025
c0773ad
Fix error message text in create-media-account E2E tests
alexbottenberg Nov 20, 2025
be5b075
Merge master into VIBE-175: Consolidate CFT IDAM tests
alexbottenberg Nov 24, 2025
7862b1d
Fix publication ID assertion in summary-of-publications test
alexbottenberg Nov 24, 2025
56104a6
Export file storage functions from publication module
alexbottenberg Nov 24, 2025
620bd02
Add missing Artefact fields to publication queries
alexbottenberg Nov 24, 2025
a7f2e83
Export getArtefactById from publication module
alexbottenberg Nov 24, 2025
6bd93c5
Add await to validateForm call in manual-upload
alexbottenberg Nov 24, 2025
6fd0ef2
Remove file-publication and file-publication-data files
alexbottenberg Nov 24, 2025
cc2fae4
Fix Local Admin test - add missing navigation and login
alexbottenberg Nov 24, 2025
f02f8a4
Improve create-media-account test error handling
alexbottenberg Nov 24, 2025
0d9c2c1
Ensure upload directory exists before writing files
alexbottenberg Nov 24, 2025
1838b57
Merge branch 'master' into VIBE-175
alexbottenberg Nov 24, 2025
9bee10f
Fix all create-media-account form submission tests
alexbottenberg Nov 24, 2025
ea2afb9
Fix Prisma schema syntax error - add missing closing brace
alexbottenberg Nov 24, 2025
b930527
Fix repository query unit tests by adding missing mocks
alexbottenberg Nov 24, 2025
ef50f81
Fix summary-of-publications tests
alexbottenberg Nov 24, 2025
10163cd
Improve web app test coverage to 100%
alexbottenberg Nov 24, 2025
2dab4a3
Fix ReDoS vulnerability in email validation regex
alexbottenberg Nov 24, 2025
7b37fb5
Fix timeout in remove-list-confirmation test
alexbottenberg Nov 24, 2025
304c113
Fix E2E test for terms and conditions error message
alexbottenberg Nov 24, 2025
e1b3f81
Fix E2E test for remove publication validation
alexbottenberg Nov 24, 2025
44beeda
Fix E2E test for autocomplete location selection
alexbottenberg Nov 24, 2025
1c016f3
Remove publication-related changes not part of VIBE-175
alexbottenberg Nov 24, 2025
558a8cc
Fix import for saveUploadedFile in manual-upload-summary
alexbottenberg Nov 24, 2025
2e47e8b
Fix mock for saveUploadedFile in manual-upload-summary test
alexbottenberg Nov 24, 2025
c9c14ee
Fix manual upload E2E test failures in CI pipeline
alexbottenberg Nov 25, 2025
360fddf
Add CSRF tokens to remove-list forms
alexbottenberg Nov 25, 2025
1f7d341
Fix remove-publication E2E test race conditions
alexbottenberg Nov 25, 2025
6ae2b23
Add unit tests for file upload middleware configuration
alexbottenberg Nov 25, 2025
03caad4
Add unit tests for account-request-submitted page
alexbottenberg Nov 25, 2025
ab003dd
Add unit tests for CSRF middleware
alexbottenberg Nov 25, 2025
34dceea
Add comprehensive unit tests for create-media-account error handling
alexbottenberg Nov 25, 2025
eb47726
Add unit tests for manual-upload locationId array handling (line 38)
alexbottenberg Nov 25, 2025
5ba2b97
Add unit tests for file-storage error handling (lines 18-20, 25-29, 6…
alexbottenberg Nov 25, 2025
b029a9c
Add unit tests for defensive file check in create-media-account (line…
alexbottenberg Nov 25, 2025
1daffef
Add comprehensive unit tests for app.ts configuration (lines 32-166)
alexbottenberg Nov 25, 2025
cfc49b8
Fix SonarQube issue: Use Set instead of Array for ALLOWED_FILE_TYPES
alexbottenberg Nov 25, 2025
9740c1e
Fix SonarQube code smell: Add error logging to catch block in file-st…
alexbottenberg Nov 25, 2025
e6aed2c
Fix SonarQube code smell: Remove duplicate implementation in getArtef…
alexbottenberg Nov 25, 2025
f7fedb0
Add unit tests for handleMulterError middleware and remove v8 ignore …
alexbottenberg Nov 25, 2025
c83c25b
Fix security vulnerability: Add comprehensive validation to prevent d…
alexbottenberg Nov 25, 2025
9710bf7
Fix test isolation: Clear cookies in beforeEach hooks to prevent sess…
alexbottenberg Nov 25, 2025
a945271
Improve email validation error messages to distinguish empty vs inval…
alexbottenberg Nov 25, 2025
ce6ef0b
Enhance keyboard navigation tests to verify complete interactions and…
alexbottenberg Nov 25, 2025
74de63b
Add proper TypeScript types to multer error handling to eliminate 'any'
alexbottenberg Nov 25, 2025
333c94d
Fix Windows compatibility in findRepoRoot by removing hardcoded UNIX …
alexbottenberg Nov 25, 2025
7ee21fd
Fix ambiguous file matching in getUploadedFile with strict pattern va…
alexbottenberg Nov 25, 2025
12a3c04
Replace console.error with structured logging in file-storage
alexbottenberg Nov 25, 2025
3ea76e7
Fix app.test.ts: replace toHaveBeenCalledBefore and strengthen route …
alexbottenberg Nov 25, 2025
4fc43d3
Fix keyboard navigation E2E test to be more robust
alexbottenberg Nov 25, 2025
6741640
Fix keyboard submission test heading locator
alexbottenberg Nov 25, 2025
638905c
Fix GHSA-wqch-xfxh-vrr4: upgrade body-parser to 2.2.1
alexbottenberg Nov 25, 2025
d27197f
Fix remaining toHaveBeenCalledBefore usage in app.test.ts
alexbottenberg Nov 25, 2025
3bcd310
Fix validateForm mock inconsistency in manual-upload tests
alexbottenberg Nov 26, 2025
8774877
Replace line-number references with behavior descriptions in manual-u…
alexbottenberg Nov 26, 2025
3cf2edb
Merge master into VIBE-175
alexbottenberg Nov 26, 2025
d222a21
Fix CFT_IDAM_URL test to use deterministic value
alexbottenberg Nov 26, 2025
579b47b
Remove duplicate @hmcts/auth mock in remove-list-confirmation test
alexbottenberg Nov 26, 2025
f5099c5
Treat empty locationId array as validation failure and refactor tests
alexbottenberg Nov 26, 2025
3822bf1
Fix session race conditions in reference data handlers
alexbottenberg Nov 26, 2025
b660f36
Fix CFT IDAM E2E tests configuration
alexbottenberg Nov 26, 2025
4b304ad
Add missing CSRF tokens to system admin forms
alexbottenberg Nov 26, 2025
462ed38
Remove hardcoded CFT_IDAM_URL from playwright config
alexbottenberg Nov 26, 2025
095740b
Fix reference-data-upload E2E tests configuration
alexbottenberg Nov 26, 2025
8480cf7
Fix all remaining reference-data-upload E2E test failures
alexbottenberg Nov 26, 2025
8951ab7
Remove duplicate POST route registration for /reference-data-upload
alexbottenberg Nov 26, 2025
835b6d3
Update file upload middleware tests to match new limits
alexbottenberg Nov 26, 2025
10f7133
Replace hardcoded past dates with dynamic future dates in E2E tests
alexbottenberg Nov 26, 2025
9bab2ab
Improve date generation in E2E tests for better validation
alexbottenberg Nov 26, 2025
42ac2d0
Merge branch 'master' into VIBE-175
junaidiqbalmoj Nov 27, 2025
0ed93f8
Merge branch 'master' into VIBE-175
junaidiqbalmoj Nov 27, 2025
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
15 changes: 13 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,21 @@ jobs:
yarn workspace e2e-tests run test:e2e 2>&1 | tee e2e-server-logs.txt

# Publish test results to PR checks
- name: Check if junit results exist
id: check-junit
if: always()
run: |
if [ -f e2e-tests/junit-results.xml ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "⚠️ junit-results.xml not found - tests may not have run in CI mode"
fi

- name: Test Report
id: test-report
uses: dorny/test-reporter@v2
if: always()
if: always() && steps.check-junit.outputs.exists == 'true'
with:
name: E2E Test Results
path: e2e-tests/junit-results.xml
Expand Down Expand Up @@ -222,7 +233,7 @@ jobs:
# Publish test results as a PR comment
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always() && github.event_name == 'pull_request'
if: always() && github.event_name == 'pull_request' && steps.check-junit.outputs.exists == 'true'
with:
files: e2e-tests/junit-results.xml
check_name: E2E Test Results
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ coverage/
lcov.info
.playwright-mcp/
.test-artefacts.json
e2e-tests/junit-results.xml

# Turborepo
.turbo/
Expand All @@ -50,6 +51,13 @@ lcov.info

# agentic env vars
.mcp.env
.mcp.json
.claude/claude.env
.claude/analytics

# Temporary uploads
apps/web/storage/temp/uploads/

# Local storage
storage/

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- CreateTable
CREATE TABLE "media_application" (
"id" TEXT NOT NULL,
"full_name" TEXT NOT NULL,
"email" TEXT NOT NULL,
"employer" TEXT NOT NULL,
"file_name" TEXT NOT NULL,
"status" TEXT NOT NULL DEFAULT 'PENDING' CHECK ("status" IN ('PENDING', 'APPROVED', 'REJECTED')),
"request_date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"status_date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "media_application_pkey" PRIMARY KEY ("id")
);
13 changes: 13 additions & 0 deletions apps/postgres/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ model Artefact {
@@map("artefact")
}

model MediaApplication {
id String @id @default(cuid())
fullName String @map("full_name")
email String
employer String
fileName String @map("file_name")
status String @default("PENDING")
requestDate DateTime @default(now()) @map("request_date")
statusDate DateTime @default(now()) @map("status_date")

@@map("media_application")
}

model User {
userId String @id @default(uuid()) @map("user_id") @db.Uuid
email String @db.VarChar(255)
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"config": "4.1.1",
"connect-redis": "9.0.0",
"cookie-parser": "1.4.7",
"csrf-sync": "^4.2.1",
"dotenv": "17.2.3",
"express": "5.1.0",
"express-session": "1.18.2",
Expand Down
Loading
Loading