User Panel: Phase-8-Abschluss, Titelbild/Lizenzen/Zeitzonen und KI-Pruef-Pipeline
Phase 8 (Rest) + Umbauten vom 10./11.06.: - Ein Titelbild pro PM (Cover 1280x580), SVG-Platzhalter-Set + Picker, PressReleaseCoverImage-Resolver - Lizenz-/Rechteformular nach "Lizenztyp Bildupload" (7 Lizenztypen, Personen-/Sachrechte-Status, bedingte Pflichtfelder, Risikohinweise) - Veroeffentlichungs-Box vereinfacht (Embargo aus der Form-UI entfernt), geplante Termine in Europe/Berlin (Speicherung UTC, DISPLAY_TIMEZONE) - Quota-Stub (users.press_release_quota) + monatlicher Reset-Command - Einreichungs-Modal einheitlich in Show/Create/Edit; Ghost-Buttons auf filled; PM-Editor-Layout responsive entkoppelt (.pr-editor-layout) KI-Pruef-Pipeline (Phasen 1-5 des Entwicklungsplans): - API-Haertung: status nicht mehr per API setzbar, eigene Submit-Route durch denselben Funnel (Blacklist, Quota, Status-Log) - Klassifikation Rot/Gelb/Gruen asynchron (Queue classification, OpenAI-Treiber + deterministischer Fallback), ki_audits-Audit-Log - Routing: Rot -> rejected + Mail, Gelb -> Review-Queue, Gruen -> Auto-Publish; Scheduler publiziert nur gruene faellige PMs - Content-Score 0-100 -> Stufe (Standard/Geprueft/Hochwertig) inkl. Editor-Panel und Badges; Re-Klassifikation/-Score bei Aenderung - Admin: KI-Badge + Filter, On-Demand-Pruefung mit Anbieter-Override Suite: 442 passed, 4 skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0efabaf446
commit
a000238ca8
141 changed files with 5922 additions and 1001 deletions
|
|
@ -31,7 +31,7 @@ function makeSchedulingCustomer(): array
|
|||
return compact('customer', 'company', 'contact', 'category');
|
||||
}
|
||||
|
||||
test('create form persistiert scheduled_at und embargo_at', function () {
|
||||
test('create form persistiert scheduled_at aus datum und uhrzeit ohne embargo', function () {
|
||||
/** @var TestCase $this */
|
||||
Carbon::setTestNow('2026-06-01 10:00:00');
|
||||
|
||||
|
|
@ -43,7 +43,8 @@ test('create form persistiert scheduled_at und embargo_at', function () {
|
|||
->set('text', str_repeat('Inhalt eines Tests. ', 5))
|
||||
->set('categoryId', $category->id)
|
||||
->set('publishMode', 'scheduled')
|
||||
->set('scheduledAt', '2026-06-05T14:30')
|
||||
->set('scheduledDate', '2026-06-05')
|
||||
->set('scheduledTime', '14:30')
|
||||
->set('useEmbargo', true)
|
||||
->set('embargoAt', '2026-06-10T08:00')
|
||||
->call('save')
|
||||
|
|
@ -51,8 +52,11 @@ test('create form persistiert scheduled_at und embargo_at', function () {
|
|||
|
||||
$pr = PressRelease::query()->latest('id')->firstOrFail();
|
||||
|
||||
expect($pr->scheduled_at?->toDateTimeString())->toBe('2026-06-05 14:30:00');
|
||||
expect($pr->embargo_at?->toDateTimeString())->toBe('2026-06-10 08:00:00');
|
||||
// Eingabe 14:30 erfolgt in Europe/Berlin (CEST, +02:00) und wird als
|
||||
// 12:30 UTC gespeichert.
|
||||
expect($pr->scheduled_at?->toDateTimeString())->toBe('2026-06-05 12:30:00');
|
||||
expect($pr->scheduled_at?->copy()->setTimezone('Europe/Berlin')->format('Y-m-d H:i'))->toBe('2026-06-05 14:30');
|
||||
expect($pr->embargo_at)->toBeNull();
|
||||
});
|
||||
|
||||
test('create form lehnt scheduled_at in der Vergangenheit ab', function () {
|
||||
|
|
@ -72,7 +76,7 @@ test('create form lehnt scheduled_at in der Vergangenheit ab', function () {
|
|||
->assertHasErrors(['scheduledAt']);
|
||||
});
|
||||
|
||||
test('create form lehnt embargo_at in der Vergangenheit ab', function () {
|
||||
test('create form lehnt geplanten termin aus datum und uhrzeit in der vergangenheit ab', function () {
|
||||
/** @var TestCase $this */
|
||||
Carbon::setTestNow('2026-06-01 10:00:00');
|
||||
|
||||
|
|
@ -80,13 +84,11 @@ test('create form lehnt embargo_at in der Vergangenheit ab', function () {
|
|||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.create')
|
||||
->set('title', 'Vergangenes Embargo')
|
||||
->set('text', str_repeat('Inhalt eines Tests. ', 5))
|
||||
->set('categoryId', $category->id)
|
||||
->set('useEmbargo', true)
|
||||
->set('embargoAt', '2026-05-30T10:00')
|
||||
->set('publishMode', 'scheduled')
|
||||
->set('scheduledDate', '2026-05-30')
|
||||
->set('scheduledTime', '10:00')
|
||||
->call('save')
|
||||
->assertHasErrors(['embargoAt']);
|
||||
->assertHasErrors(['scheduledAt']);
|
||||
});
|
||||
|
||||
test('publishMode now setzt scheduled_at auf null beim Save', function () {
|
||||
|
|
@ -108,7 +110,7 @@ test('publishMode now setzt scheduled_at auf null beim Save', function () {
|
|||
expect($pr->scheduled_at)->toBeNull();
|
||||
});
|
||||
|
||||
test('edit form hydriert scheduled_at und embargo_at', function () {
|
||||
test('edit form hydriert scheduled_at in datum und uhrzeit ohne embargo', function () {
|
||||
/** @var TestCase $this */
|
||||
Carbon::setTestNow('2026-06-01 10:00:00');
|
||||
|
||||
|
|
@ -120,7 +122,9 @@ test('edit form hydriert scheduled_at und embargo_at', function () {
|
|||
'category_id' => $category->id,
|
||||
'portal' => $company->portal->value,
|
||||
'status' => 'draft',
|
||||
'scheduled_at' => '2026-06-05 14:30:00',
|
||||
// 12:30 UTC entspricht 14:30 in Europe/Berlin (CEST) – so wird der
|
||||
// Termin in den Eingabefeldern angezeigt.
|
||||
'scheduled_at' => '2026-06-05 12:30:00',
|
||||
'embargo_at' => '2026-06-10 08:00:00',
|
||||
]);
|
||||
$pr->contacts()->sync([$contact->id]);
|
||||
|
|
@ -130,6 +134,8 @@ test('edit form hydriert scheduled_at und embargo_at', function () {
|
|||
LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id])
|
||||
->assertSet('publishMode', 'scheduled')
|
||||
->assertSet('scheduledAt', '2026-06-05T14:30')
|
||||
->assertSet('useEmbargo', true)
|
||||
->assertSet('embargoAt', '2026-06-10T08:00');
|
||||
->assertSet('scheduledDate', '2026-06-05')
|
||||
->assertSet('scheduledTime', '14:30')
|
||||
->assertSet('useEmbargo', false)
|
||||
->assertSet('embargoAt', null);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue