user->attachPermission(Permission::where('name', 'read-admin-panel')->firstOrFail()); $repository = Mockery::mock(DingPayableWorkflowMirrorRepository::class); $repository->shouldReceive('paginate')->once()->andReturn([ 'data' => [[ 'process_instance_id' => 'PROC-TEST-001', 'workflow' => [ 'businessId' => '202607031324000376786', 'title' => '应付申请流程', 'status' => 'COMPLETED', 'result' => 'agree', 'originatorUserId' => 'user-1', 'originatorUserName' => '扬灵', 'originatorDeptName' => '财务部', 'createAt' => '2026-08-28 10:00:00', 'finishTime' => '2026-08-28 11:00:00', ], 'detail' => ['类型' => '快递运费', '用途' => '拉到江西仓的车费', '付款金额' => '1200'], 'fields' => ['应付明细' => [], '付款明细' => [['付款金额' => '1200']], '附件' => []], 'tasks' => [['status' => 'COMPLETED']], ]], 'total' => 1, 'status' => 'succeeded', 'last_synced_at' => '2026-08-28 11:05:00', ]); $this->app->instance(DingPayableWorkflowMirrorRepository::class, $repository); $this->loginAs()->get(route('business.pages.show', [ 'section' => 'courier-payables', 'page' => 'payable-cloud-warehouse-vehicle-fee', ]))->assertOk() ->assertSee('应付云仓车费') ->assertSee('钉钉审批编号') ->assertSee('202607031324000376786') ->assertSee('扬灵') ->assertSee('已完成') ->assertSee('拉到江西仓的车费') ->assertSee('用途同时包含“仓”“车费”') ->assertSee('全部表单字段') ->assertSee('审批任务') ->assertSee('镜像状态:succeeded'); } public function test_cloud_warehouse_vehicle_fee_page_uses_ding_talk_rejection_result(): void { $this->user->attachPermission(Permission::where('name', 'read-admin-panel')->firstOrFail()); $repository = Mockery::mock(DingPayableWorkflowMirrorRepository::class); $repository->shouldReceive('paginate')->once()->andReturn([ 'data' => [[ 'process_instance_id' => 'PROC-TEST-REJECTED', 'workflow' => [ 'businessId' => '202608291446000258827', 'title' => '应付申请流程', 'status' => 'COMPLETED', 'result' => 'refuse', 'originatorUserId' => 'user-1', 'originatorUserName' => '扬灵', ], 'detail' => ['类型' => '快递运费', '用途' => '拉到江西仓的车费'], 'fields' => [], 'tasks' => [], ]], 'total' => 1, 'status' => 'succeeded', 'last_synced_at' => '2026-08-31 13:42:04', ]); $this->app->instance(DingPayableWorkflowMirrorRepository::class, $repository); $this->loginAs()->get(route('business.pages.show', [ 'section' => 'courier-payables', 'page' => 'payable-cloud-warehouse-vehicle-fee', ]))->assertOk() ->assertSee('