commit melhorias compras4
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 16:28:03 +02:00
parent efd97e265b
commit 36dcfdf00c
118 changed files with 6042 additions and 92 deletions
+3 -3
View File
@@ -105,10 +105,10 @@ test('optional finance search uses native invoice scope and returns references w
$create(receiptFixture());
$finance = User::factory()->create(['tenant_id' => $f['tenant']->id, 'department_id' => $f['department']->id, 'purchasing_role' => PurchasingRole::Finance]);
$this->actingAs($finance)->get('/compras/pesquisa?q=QA-SEARCH-INVOICE')->assertInertia(fn (Assert $page) => $page->has('groups', 8)
->where('groups.7.key', 'invoices')->where('groups.7.records.total', 1)->where('groups.7.records.data.0.href', '/facturas?invoice_id='.$ownInvoice->id)
->where('invoiceSearchAvailable', true)->where('groups.7.key', 'invoices')->where('groups.7.records.total', 1)->where('groups.7.records.data.0.href', '/facturas?invoice_id='.$ownInvoice->id)
->missing('groups.7.records.data.0.snapshot')->missing('groups.7.records.data.0.total_minor'));
$this->get('/facturas?invoice_id='.$ownInvoice->id)->assertOk()->assertInertia(fn (Assert $page) => $page->where('focusInvoiceId', $ownInvoice->id));
$this->actingAs($f['issuer'])->get('/compras/pesquisa?q=QA-SEARCH-INVOICE')->assertInertia(fn (Assert $page) => $page->has('groups', 7));
$this->actingAs($f['issuer'])->get('/compras/pesquisa?q=QA-SEARCH-INVOICE')->assertInertia(fn (Assert $page) => $page->where('invoiceSearchAvailable', false)->has('groups', 7));
config(['procurement_search.finance_metadata_enabled' => false]);
$this->actingAs($finance)->get('/compras/pesquisa?q=QA-SEARCH-INVOICE')->assertInertia(fn (Assert $page) => $page->has('groups', 7));
$this->actingAs($finance)->get('/compras/pesquisa?q=QA-SEARCH-INVOICE')->assertInertia(fn (Assert $page) => $page->where('invoiceSearchAvailable', false)->has('groups', 7));
});