Skip to content

[mobile] Shipping tests#323

Open
lauty95 wants to merge 19 commits intomobile_v15from
feat/shipping-tests
Open

[mobile] Shipping tests#323
lauty95 wants to merge 19 commits intomobile_v15from
feat/shipping-tests

Conversation

@lauty95
Copy link
Copy Markdown
Collaborator

@lauty95 lauty95 commented Feb 20, 2026

#304

## Pending Work:
test_cancel_submitted_delivery_note Skipped because frontend does not load docstatus when navigating directly to /app/delivery-note/{id} URL.

test_scan_handling_unit_on_delivery_note

@lauty95 lauty95 self-assigned this Feb 20, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 20, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py10100% 
beam
   barcodes.py1073963%21, 30, 36–37, 43, 46, 58, 80–81, 83–84, 90–92, 94–96, 103–105, 111, 121, 129, 136, 139–140, 146–147, 153, 159, 165, 171, 183, 186–189, 191–192
   handling_unit.py813655%32, 64–66, 84, 95–96, 102–103, 105–106, 108–109, 111–112, 114, 116–119, 121–123, 125, 127, 129–130, 135, 137, 141, 143–144, 147, 149–150, 158
   printing.py935540%18–19, 48, 50–53, 62–66, 70–71, 83–87, 91, 97, 106–112, 114–115, 117, 122, 124–125, 140–145, 147–153, 160–163, 165–168
   zpl_layout.py2442440%12–15, 17, 20, 36, 47–48, 51–52, 54–55, 58, 61, 64–67, 69–71, 77, 81–83, 86–87, 90–91, 93–94, 99, 101, 110–111, 113, 115, 118–120, 122–125, 128–129, 132, 140–141, 144–146, 154, 157, 161, 164, 167, 177–183, 185, 188, 193–196, 198, 201–206, 209–215, 217, 219, 222, 224–227, 231–233, 235–239, 241–245, 249–253, 258, 260, 263–269, 278–282, 285–292, 295–308, 311–313, 316–328, 331, 334–336, 339–353, 356–361, 364, 366, 369, 384, 386–387, 390–391, 393, 395, 397–399, 402, 411, 418–420, 423–424, 427, 429–433, 436, 439–442, 445–448, 451–453, 469, 471, 474–475, 496–501, 505, 507–508, 516–521
beam/demand
   demand.py3384387%51, 66, 123, 209, 243, 463–464, 483–485, 490–491, 493, 495–497, 499, 543, 621, 625, 662, 667, 674, 695–696, 707, 713–729
   receiving.py1251786%79, 131, 173, 214, 244, 249–260
   sqlite.py59198%40
   utils.py59689%56, 67, 73–75, 83
beam/doctype/beam_mobile_route
   beam_mobile_route.py30100% 
beam/doctype/beam_settings
   beam_settings.py341750%35–37, 40–41, 43, 50, 55–58, 66–68, 72–74
beam/doctype/handling_unit
   __init__.py9366%12–14
   handling_unit.py17194%27
beam/doctype/warehouse_types
   warehouse_types.py30100% 
beam/overrides
   network_printer_settings.py403220%14–18, 24–34, 42–46, 49, 52–55, 57–62
   sales_order.py10640%11–16
   stock_entry.py911682%115–116, 121–128, 134–135, 151, 183, 186–187
   work_order.py10280%14, 16
beam/report/demand_map
   demand_map.py35350%4–5, 7–8, 11–12, 15–16, 103–111, 127, 129–143, 146–147
beam/report/handling_unit_traceability
   handling_unit_traceability.py44440%4–6, 9–11, 30–32, 34–35, 37–38, 41–42, 45–46, 48–49, 51–52, 54–55, 57, 63–65, 67–69, 71, 74–77, 79–81, 83–86, 89–90
beam/scan
   __init__.py1912785%24, 34, 161–162, 172, 174–175, 179, 183–184, 187, 193, 204–205, 209, 230, 234, 263, 265, 284–285, 291, 294, 297, 406, 414, 421
   config.py28280%4, 6, 9–17, 19–21, 23–26, 28–30, 32–35, 38–39, 41
   user_login.py31310%4–6, 8, 11–13, 17–19, 21–22, 24–25, 27–29, 31–33, 35–38, 40–45, 47
www/beam
   __init__.py14140%4–7, 10–19
   index.py770%4, 6, 9–13
TOTAL167470457% 

@lauty95 lauty95 requested a review from agritheory February 20, 2026 18:23
@lauty95
Copy link
Copy Markdown
Collaborator Author

lauty95 commented Feb 27, 2026

@agritheory

All the tests from this issue are covered: #304

I also added this features besides its tests:

  • If you try to leave the Ship page, a confirmation alert is shown
  • Scanning a HU populates the items correctly

Demo

Screen.Recording.2026-02-27.at.11.51.51.AM.mov

@github-actions
Copy link
Copy Markdown

📝 Draft Changelog Entry

Changelog Entry

This update adds comprehensive testing for the mobile shipping workflow and includes several fixes to ensure accurate delivery note processing.

The delivery note interface now supports submit and cancel functionality, allowing delivery notes to be properly finalized or reverted. Handling units can be added or associated with delivery notes during the shipping process, and delivery notes themselves can be added or associated as needed.

The scanning system has been updated to prevent over-delivery by limiting scan quantities to match order quantities. An issue where the order ID was not being correctly identified has been resolved. Validation logic has been corrected to ensure proper error handling during the shipping workflow.

The mobile shipping interface has been enhanced to warn users when attempting to ship with unsaved changes, and the system now supports shipping without requiring items to be scanned. Partial shipments can be completed, and submitted shipments can be cancelled when necessary.

This changelog entry was automatically generated by the Changelog Generator Action.

@lauty95
Copy link
Copy Markdown
Collaborator Author

lauty95 commented Mar 27, 2026

@agritheory

Conflicts fixed. Ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant