Tornar a suite de testes portável e alinhada com o código
- sgfTempoPath(): substitui caminhos C:/laragon fixos (SGF_TEMPO_ROOT, por omissão a pasta irmã sgf-tempo, igual ao Laragon). - skipUnlessIsolatedPostgres(): testes que exigem a base QA PostgreSQL isolada passam a ser ignorados com motivo em SQLite em vez de rebentar. - Artefacto de distribuição orçamental gerado localmente: ignorado se ausente. - Páginas públicas /consulta e /proposta: testes alinhados com os redireccionamentos para os módulos reais (decisão de 29/11). - Impressão da ordem: texto do aviso orçamental actualizado. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,13 +120,13 @@ test('audit failure rolls back both halves of transfer and operation', function
|
||||
expect(StockOperation::query()->count())->toBe(0)->and(StockMovement::query()->count())->toBe(1);
|
||||
});
|
||||
|
||||
test('operations are immutable and new public screen contains only demonstration props', function () {
|
||||
test('operations are immutable and the former public screen redirects to the real module', function () {
|
||||
$this->postJson('/stock/operacoes', $this->p)->assertCreated();
|
||||
$op = StockOperation::query()->firstOrFail();
|
||||
expect(fn () => $op->update(['reason' => 'rewrite']))->toThrow(LogicException::class);
|
||||
expect(fn () => $op->delete())->toThrow(LogicException::class);
|
||||
$this->get('/stock/operacoes')->assertInertia(fn (Assert $p) => $p->component('stock/operations')->has('operations.data', 1)->where('canOperate', true));
|
||||
$this->get('/consulta/operacoes-stock')->assertInertia(fn (Assert $p) => $p->component('preview/index')->where('initialScreen', 'operations')->missing('operations')->where('auth.user', null));
|
||||
$this->get('/consulta/operacoes-stock')->assertRedirect('/stock/operacoes');
|
||||
});
|
||||
|
||||
test('invalid precision and missing justification or destination do not write', function ($field, $value) {
|
||||
|
||||
Reference in New Issue
Block a user