Overview
Implement comprehensive E2E test coverage for Trustify UI pages using vanilla Playwright spec tests following Page Object Model pattern.
Test Approach:
- Vanilla Playwright spec tests (
.spec.ts files)
- Page Object Model pattern
- Custom assertions from existing framework
- No BDD/Gherkin features
Testing Decisions:
- Breadcrumb navigation tests excluded - Justified as low risk (standard PatternFly component behavior)
Total Deliverables: 34 spec files + 5 page objects
Phase 1: File Upload Tests
Goal: Implement upload functionality tests for advisories and SBOMs
Estimated Files: 9 spec files + 2 page objects
Foundation Tasks (Do First)
Advisory Upload - /advisories/upload
Tasks:
SBOM Upload - /sboms/upload
Tasks:
Phase 2: License List
Goal: Implement license list page tests
Estimated Files: 4 spec files + 1 page object
Foundation Tasks (Do First)
License List Tests - /licenses
Tasks:
Phase 3: Not Found Page
Goal: Implement 404 error page tests
Estimated Files: 1 spec file + 1 page object
Tasks:
Phase 4: Importer List Enhancements
Goal: Enhance importer list tests with advanced functionality
Estimated Files: 4 spec files + 1 page object
Tasks:
Phase 5: Advisory Details Enhancements
Goal: Complete advisory details page test coverage
Estimated Files: 3 spec files (1 enhanced, 2 new)
Tasks:
Phase 6: Package Details Enhancements
Goal: Complete package details page test coverage
Estimated Files: 3 spec files (1 enhanced, 2 new)
Tasks:
Phase 7: SBOM Details Enhancements
Goal: Complete SBOM details page test coverage
Estimated Files: 5 spec files (2 enhanced, 3 new)
Tasks:
Phase 8: Vulnerability Details Enhancements
Goal: Complete vulnerability details page test coverage
Estimated Files: 5 spec files (1 enhanced, 4 new)
Tasks:
Key Patterns
- Use custom assertions from
e2e/tests/ui/assertions/
- Follow Page Object Model from existing tests
- Test critical user flows end-to-end
- Verify URL state persistence for filters/pagination
- Test both success and error scenarios
- Exclude breadcrumb navigation tests (low risk, standard PatternFly behavior)
Reference Files
e2e/tests/ui/pages/Table.ts - Table interaction patterns
e2e/tests/ui/pages/Toolbar.ts - Filter patterns
e2e/tests/ui/pages/common/filter-test-helpers.ts - Reusable helpers
client/src/app/components/UploadFiles.tsx - Upload UI structure
e2e/tests/ui/pages/sbom-list/SbomListPage.ts - List page pattern
client/src/app/pages/importer-list/importer-list.tsx - Expandable row pattern
Verification
# Run individual tests
npm run e2e:test -- <test-file-path>
# Run full suite
npm run e2e:test
Overview
Implement comprehensive E2E test coverage for Trustify UI pages using vanilla Playwright spec tests following Page Object Model pattern.
Test Approach:
.spec.tsfiles)Testing Decisions:
Total Deliverables: 34 spec files + 5 page objects
Phase 1: File Upload Tests
Goal: Implement upload functionality tests for advisories and SBOMs
Estimated Files: 9 spec files + 2 page objects
Foundation Tasks (Do First)
e2e/tests/common/assets/for upload test filese2e/tests/ui/pages/common/if patterns differ from existing testse2e/tests/ui/assertions/)Advisory Upload -
/advisories/uploadTasks:
AdvisoryUploadPage.tspage objectupload.spec.ts- Single file uploads (CSAF, CVE, OSV)multi-file-upload.spec.ts- Multiple file uploads, progress trackingnavigation.spec.ts- Success messages, navigation to details (no breadcrumb tests)error-handling.spec.ts- Invalid formats, malformed files, network errorsSBOM Upload -
/sboms/uploadTasks:
SbomUploadPage.tspage objectupload.spec.ts- Single file uploads (CycloneDX 1.3-1.6, SPDX 2.2-2.3)format-validation.spec.ts- Format validation, version supportmulti-file-upload.spec.ts- Mixed format uploadsnavigation.spec.ts- Success messages, navigation to details (no breadcrumb tests)Phase 2: License List
Goal: Implement license list page tests
Estimated Files: 4 spec files + 1 page object
Foundation Tasks (Do First)
e2e/tests/ui/pages/Navigation.ts- Add "Licenses" menu option for navigationLicense List Tests -
/licensesTasks:
LicenseListPage.tspage objectfilter.spec.ts- Text filters, clear filters, URL persistencepagination.spec.ts- Pagination controls, items per pagesort.spec.ts- Column sortingcolumns.spec.ts- Column visibility and data renderingPhase 3: Not Found Page
Goal: Implement 404 error page tests
Estimated Files: 1 spec file + 1 page object
Tasks:
NotFoundPage.tspage objecterror-page.spec.ts- 404 display, error icon, invalid routesPhase 4: Importer List Enhancements
Goal: Enhance importer list tests with advanced functionality
Estimated Files: 4 spec files + 1 page object
Tasks:
ImporterListPage.tspage objectenable-disable.spec.ts- Enable/disable with confirmation dialogsrun-now.spec.ts- Run Now functionality, progress trackingexpandable-reports.spec.ts- Reports table, pagination, sortinglog-viewer.spec.ts- Log modal functionalityPhase 5: Advisory Details Enhancements
Goal: Complete advisory details page test coverage
Estimated Files: 3 spec files (1 enhanced, 2 new)
Tasks:
info.spec.ts- Overview, publisher, tracking cardsactions.spec.ts- Download and delete actionsvulnerabilities/columns.spec.ts- Discovery, release, score, CWE columnsPhase 6: Package Details Enhancements
Goal: Complete package details page test coverage
Estimated Files: 3 spec files (1 enhanced, 2 new)
Tasks:
info.spec.ts- Package name, qualifiersvulnerabilities/filter.spec.ts- Filter functionality, affected vulnerabilitiessboms/help.spec.ts- Help icon popoverPhase 7: SBOM Details Enhancements
Goal: Complete SBOM details page test coverage
Estimated Files: 5 spec files (2 enhanced, 3 new)
Tasks:
info.spec.ts- Metadata, creation, statistics, package cardsactions.spec.ts- Delete with confirmationpackages/expandable-rows.spec.ts- Vulnerabilities per packagepackages/license.spec.ts- License info and mappingsvulnerabilities/expandable-rows.spec.ts- Detailed vuln infovulnerabilities/help.spec.ts- Help popoverPhase 8: Vulnerability Details Enhancements
Goal: Complete vulnerability details page test coverage
Estimated Files: 5 spec files (1 enhanced, 4 new)
Tasks:
info.spec.ts- Severity shield, CVSS scoreoverview.spec.ts- Description, reserved/published/modified dates with help popoverssboms/expandable-rows.spec.ts- Affected packages per SBOMsboms/status-labels.spec.ts- Vulnerability status labelsadvisories/filter.spec.ts- Filter functionalityKey Patterns
e2e/tests/ui/assertions/Reference Files
e2e/tests/ui/pages/Table.ts- Table interaction patternse2e/tests/ui/pages/Toolbar.ts- Filter patternse2e/tests/ui/pages/common/filter-test-helpers.ts- Reusable helpersclient/src/app/components/UploadFiles.tsx- Upload UI structuree2e/tests/ui/pages/sbom-list/SbomListPage.ts- List page patternclient/src/app/pages/importer-list/importer-list.tsx- Expandable row patternVerification