Closed emoss08 closed 1 month ago
This pull request aims to improve test coverage by adding new tests, refactoring existing code, and making various enhancements across multiple files. The changes include the addition of new test cases, refactoring of database setup for tests, and improvements to the frontend components.
Files | Changes |
---|---|
pkg/testutils/test_db.go pkg/testutils/test_fiber_app.go pkg/testutils/factory/organization_factory.go |
Refactored test utilities to use Docker for creating and managing test databases, and updated factory functions for creating test data. |
web/frontend/src/pages/admin/AuditLogs.tsx web/frontend/src/components/common/fields/select-input.tsx web/frontend/src/components/layout/aside-menu.tsx web/frontend/src/components/layout/user-aside-menu.tsx web/frontend/src/components/layout/logo.tsx web/frontend/src/components/layout/user-avatar-menu.tsx web/frontend/src/components/audit-log/audit-log-table.tsx web/frontend/src/components/common/table/data-table-export-modal.tsx web/frontend/src/components/common/table/data-table.tsx web/frontend/src/components/layout/breadcrumb.tsx web/frontend/src/components/ui/dialog.tsx web/frontend/src/components/ui/sheet.tsx |
Updated various frontend components for improved styling, layout, and functionality. |
pkg/models/division_code.go pkg/models/business_unit.go pkg/models/commodity.go pkg/models/hazardous_material.go pkg/models/general_ledger_account.go pkg/models/accessorial_charge.go pkg/models/charge_type.go pkg/models/customer.go pkg/models/document_classification.go pkg/models/qualifier_code.go |
Updated model annotations to use bun ORM and refactored model fields and relationships. |
internal/api/services/report.service.go internal/api/handlers/report.handler.go internal/api/services/chargetype.service.go internal/api/services/accessorialcharge.service.go internal/api/common/audittable_service.go internal/api/services/customer.service.go internal/api/services/generalledgeraccount.service.go internal/api/services/location.service_test.go internal/api/services/customer.service_test.go internal/api/services/accessorialcharge.service_test.go internal/api/services/commenttype.service_test.go internal/api/services/commodity.service_test.go internal/api/services/delaycode.service_test.go |
Added new test cases for various services and updated service implementations for better error handling and logging. |
go.mod platform/job-processor-service/go.mod |
Updated dependencies to the latest versions and added new dependencies for testing and Docker integration. |
.github/workflows/test.yml Makefile |
Updated GitHub Actions workflow and Makefile to improve test execution and reporting. |
Summary by Sourcery
Improve test coverage by introducing Docker-based test database setup, adding new test cases for various services, and enhancing existing components and models with better styling and functionality. Update CI workflow to use Redis service and refactor codebase for improved maintainability.
New Features:
ory/dockertest
for improved test isolation.Select All
option to multi-select inputs in the frontend.SelectInput
component.UserAsideAvatar
component to display user avatars with status indicators.LocationService
,CustomerService
,AccessorialChargeService
,CommentTypeService
,CommodityService
, andDelayCodeService
.Bug Fixes:
DocumentClassification
code validation.UpdateOne
method inChargeType
to properly fetch the original state.useLogout
hook by ensuring proper session and state cleanup.Enhancements:
AuditLogTable
component to use a card layout for filters and table.AsideMenu
andUserAsideMenu
components with better styling and layout adjustments.DivisionCode
,BusinessUnit
,Commodity
, andHazardousMaterial
models to usebun
ORM with improved field definitions.generateReport
function to includefile_format
parameter for better report customization.SelectInput
component to handle grouped options andSelect All
functionality.DataTable
component with better styling and layout adjustments.Makefile
to include atest-pretty
target for running tests with pretty output usingrichgo
.Build:
go.mod
to include new dependencies for Docker and other utilities.CI:
Tests:
LocationService
,CustomerService
,AccessorialChargeService
,CommentTypeService
,CommodityService
, andDelayCodeService
.Chores:
ConnectionString
method fromDatabase
config.