commit compras3 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 18:56:24 +02:00
parent 930064269e
commit 9cf9764710
87 changed files with 2856 additions and 195 deletions
+8
View File
@@ -1969,6 +1969,14 @@ test('native consolidated order retains both origins and consumes a single invoi
expect(PurchaseOrder::query()->visibleTo($this->owner)->whereKey($order->id)->exists())->toBeTrue();
$request->forceFill(['requester_id' => $this->head->id])->save();
expect(PurchaseOrder::query()->visibleTo($this->owner)->whereKey($order->id)->exists())->toBeFalse();
// The search must respect every consolidated origin after a current department change,
// while keeping the native company-wide warehouse reader's receipt access.
$otherDepartment = Department::query()->create(['tenant_id' => $this->tenant->id, 'name' => 'Outro departamento sintético']);
$request->forceFill(['department_id' => $otherDepartment->id])->save();
$this->actingAs($this->head)->get('/compras/pesquisa?q=GR-CONSOL-QA')->assertOk()
->assertInertia(fn (Assert $page) => $page->where('groups.4.key', 'receipts')->where('groups.4.records.total', 0));
$this->actingAs($receiver)->get('/compras/pesquisa?q=GR-CONSOL-QA')->assertOk()
->assertInertia(fn (Assert $page) => $page->where('groups.4.key', 'receipts')->where('groups.4.records.total', 1));
});
test('native partial-order cancellation uses independent Finance and preserves the unissued reservation and requisition', function () {