Commit Graph

29 Commits

Author SHA1 Message Date
Nathnael
2f86557f61 test(e2e): teach the eTrade mock to answer "no record"
Every TIN resolved to the same canned company, so the premise of both manual
routes — eTrade holds nothing — could not be reached at all, and neither could
the dead end an ordinary company hits on a TIN with no trade licence.

The answer now follows the TIN's leading digit, so a spec picks its outcome by
picking its number and no per-spec stubbing is needed: 9… returns a
registration with no businesses (the co-operative / investor case, where the
API's resolveCompanyData finds no licence), 8… 404s the registration lookup
entirely, anything else behaves as before.
2026-08-18 11:37:58 +00:00
Nathnael
333232c4d9 fix(portal): persist the region a manual-registration company picks
The Region select called setValue without shouldDirty. `region` is an
eTrade-bundle key, and stepPayload sends those only when the customer changed
them this session — so for the two routes that type their address by hand (a
co-operative, a foreign investor) the region was dropped on every save while
zone, woreda and kebele went through, because those are registered inputs and
are dirty by construction.

Found by the new onboarding e2e suite: both manual-route companies finished
onboarding with zone/woreda/kebele on file and region empty.
2026-08-18 11:37:43 +00:00
Nathnael
b356433886 test(freight-e2e): fix stale onboarding selectors, tighten Fayda assertions
The onboarding journey had been failing at the company step for a while:
that step was restructured into StepSection cards, so its TIN and VAT
fields no longer have <label> elements and the label-based fill() helper
could not find them. Match on aria-label instead, which also sidesteps the
"0012345678" placeholder both fields share.

Two further staleness bugs were hiding behind that one, both in fill()
itself. It chained clear() into type() on a subject captured beforehand, so
a step-persist PATCH resolving between the two detached it; and re-querying
by the captured id was no better, because the fields remount rather than
re-render and Mantine mints a fresh generated id when they do. Resolve
label -> for -> element afresh for each action. fillPhone gets the same
treatment.

Tighten what the journey proves about Fayda. It verified out-of-band and
then never checked the result reached the UI, so assert the panel renders
fayda-mock's own payload — name, phone and email — which only holds if it
travelled Fayda -> API -> UI, and cross-check ownerFaydaSub on the company,
since that sub is what locks the owner's fields server-side. The PoA step
now asserts no file input exists while the PoA is unverified, covering the
DARS gating; asserted structurally so rewording the document setting cannot
turn a regression into a passing test.
2026-08-04 12:43:25 +00:00
Marshal
930e39c4fc Enhance internal payment handling and e2e testing setup 2026-08-02 18:39:17 +00:00
Marshal
ff772fddef fix issue 2026-08-02 10:26:36 +00:00
Marshal
53d8655dc3 Enhance booking and signature functionalities
- Updated MySignaturePage title to Signature
2026-08-01 22:03:18 +00:00
Marshal
21fdf144ca Add a minimal payment mock server for end-to-end testing 2026-08-01 18:59:14 +00:00
Marshal
8ccb0e1558 Refactor booking process to use bookAndClear utility
- Replaced instances of bookContainers with bookAndClear across multiple test files to streamline booking and acceptance process.
- Updated import statements to include bookAndClear where necessary.
- Removed redundant acceptOperation calls after booking, as bookAndClear handles this internally.
- Adjusted comments and documentation to reflect changes in booking logic.
- Modified forceReservationExpiry function to ensure payment deadlines are set correctly, preventing issues with booking promotions.
2026-08-01 18:42:45 +00:00
Marshal
20bb2f274a resolve merge conflict 2026-08-01 12:16:12 +00:00
Marshal
123f925cc1 add Group 9 delivery scenarios for self-haul and last-mile paths
- Implemented G9·S38 tests for customer self-haul truck assignments, ensuring compliance with container limits and truck assignments.
- Added G9·S39 tests for last-mile delivery, self-haul, and yard pickup, verifying independent paths for multiple bookings on the same train.
- Created seed data for Group 1 and Group 2 scenarios, ensuring proper setup for weight and capacity tests.
- Updated booking interface to deprecate  in favor of  for better clarity in allocations.
2026-08-01 12:14:37 +00:00
Nathnael
991881108d chore: test fixes 2026-07-31 10:33:27 +00:00
Nathnael
e823874d39 feat(auth): add login audience middleware (EDRFREIGHT-415) 2026-07-28 10:46:55 +00:00
Marshal
225d2c8229 add dispute functionality for contract duty and implement collection dates 2026-07-26 17:58:37 +00:00
Marshal
5e10c97294 add dispute functionality for contract duty and implement collection dates 2026-07-26 16:58:51 +00:00
Marshal
9b13fa2ac6 feat: implement wagon transfer management modals and page
- Add TransferFulfillModal for fulfilling wagon transfer requests.
- Create TransferRequestFormModal for filing new wagon transfer requests.
- Introduce TransferCloseShortModal for closing requests that cannot be fully fulfilled.
- Develop WagonTransfersPage to manage and display wagon transfer requests.
- Implement utility functions for handling wagon transfer request data and UI components.
- Enhance UI with Mantine components for better user experience.
2026-07-26 15:11:50 +00:00
Marshal
286390a3cf change contrat creation 2026-07-24 13:26:19 +00:00
Marshal
668b5e1c9d add permissions and fix issues 2026-07-23 20:24:20 +00:00
Marshal
15a6bab5d0 revert back the clerance payment 2026-07-23 13:54:09 +00:00
Marshal
13609f8d59 changes 2026-07-23 11:06:10 +00:00
Marshal
8f143b2341 fix configratio 2026-07-23 06:48:03 +00:00
Marshal
2481f43f1f add e2e test 2026-07-22 23:44:32 +00:00
Marshal
b0f561a935 Add end-to-end tests for import corridor flows
- Implement full train import journey with six container bookings filling a 54-wagon train.
- Create tests for split offer and rebooking scenarios, handling payment expiry and waiting list promotions.
- Add tests for handling waiting bookings expiration when the train is full.
- Implement tests for reopening booking windows after expired reservations.
- Seed database with necessary corridor data for import flows, including yards, container types, locomotives, and rates.
2026-07-22 21:02:17 +00:00
Marshal
5709801590 enhance shipment form and booking process 2026-07-22 17:25:01 +00:00
Marshal
410bfa5b2b changes 2026-07-22 12:19:51 +00:00
Marshal
44cad7a52b changes 2026-07-22 10:50:36 +00:00
Marshal
b5546b9d6f feat(freight-me): add position type lookup and enrich user profile with position type 2026-07-22 08:57:47 +00:00
Nathnael
eb36aab05f chore: enhance the tests 2026-07-21 13:10:44 +00:00
Nathnael
20a6ef7906 chore: more tests 2026-07-21 12:49:36 +00:00
Nathnael
b8b8c4adf7 feat(e2e): add freight e2e docker-compose stack with isolated services 2026-07-21 11:00:02 +00:00