调价后的新价格写入报价单;多段段前的货物带到各段,协同群不再把体积里的星号吃掉。海运字段齐了先核对再查价。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -134,6 +134,15 @@ class ImageInquiryFlowTests(unittest.TestCase):
|
||||
sea = get_sea_text_flow()
|
||||
sess = sea.session_of("s1")
|
||||
self.assertIsNotNone(sess)
|
||||
self.assertEqual(sess.phase, "wait_confirm")
|
||||
self.assertFalse((sess.work_order_no or "").strip())
|
||||
self.assertTrue(sess.pending_files)
|
||||
self.assertIn(copy.SEA_CONFIRM_TAIL, self._bodies()[-1])
|
||||
handle_text_inquiry(
|
||||
InboundMessage(sender_id="s1", message_id="sea-ok", content="确定"),
|
||||
store=self.store,
|
||||
)
|
||||
sess = sea.session_of("s1")
|
||||
self.assertTrue((sess.work_order_no or "").strip())
|
||||
ticket = sea.ledger.get_ticket(work_order_no=sess.work_order_no)
|
||||
self.assertTrue(ticket.attachments)
|
||||
@@ -163,7 +172,8 @@ class ImageInquiryFlowTests(unittest.TestCase):
|
||||
acks = [c for c in self._bodies() if c == copy.IMAGE_RECOGNIZING]
|
||||
self.assertEqual(len(acks), 1)
|
||||
sess = get_sea_text_flow().session_of("s1")
|
||||
self.assertTrue(sess and sess.work_order_no)
|
||||
self.assertTrue(sess and sess.phase == "wait_confirm")
|
||||
self.assertFalse((sess.work_order_no or "").strip())
|
||||
|
||||
def test_precede_text_joins_new_ticket(self) -> None:
|
||||
handle_text_inquiry(
|
||||
@@ -207,6 +217,10 @@ class ImageInquiryFlowTests(unittest.TestCase):
|
||||
injected_facts=COMPLETE_SEA,
|
||||
injected_mode="SEA",
|
||||
)
|
||||
handle_text_inquiry(
|
||||
InboundMessage(sender_id="s1", message_id="old-ok", content="确定"),
|
||||
store=self.store,
|
||||
)
|
||||
wo_old = get_sea_text_flow().session_of("s1").work_order_no
|
||||
self.assertTrue(wo_old)
|
||||
handle_image_inquiry(
|
||||
@@ -215,6 +229,10 @@ class ImageInquiryFlowTests(unittest.TestCase):
|
||||
vision_fn=_vision(SEA_ORAL),
|
||||
download_fn=lambda _mid: (b"x", ""),
|
||||
)
|
||||
handle_text_inquiry(
|
||||
InboundMessage(sender_id="s1", message_id="new-ok", content="确定"),
|
||||
store=self.store,
|
||||
)
|
||||
wo_new = get_sea_text_flow().session_of("s1").work_order_no
|
||||
self.assertTrue(wo_new)
|
||||
self.assertNotEqual(wo_old, wo_new)
|
||||
|
||||
Reference in New Issue
Block a user