Übernimm verdeckte Angebotsbedingungen und halte die Listenlänge beim Anlegen.
- „Geänderte Fassung aktivieren“ übernimmt Inhaberart, Laufzeitregel, Steuerklasse und „dynamisch“ aus der aktiven Fassung. Bisher wurden sie still auf Person/dauerhaft zurückgesetzt, obwohl die Maske „vorbelegt“ sagte. Ohne aktive Fassung gilt wie bisher die Vorgabe. - Nur Such- und Filteränderungen lassen die Liste wieder oben beginnen; Eingaben in einem geöffneten Anlegedialog klappen „Weitere anzeigen“ nicht mehr zu. - Test: Kombinationen öffnen Aufbau und Redaktion aus der Liste. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0a0e4edbc2
commit
71e71b4ef2
6 files changed
+85
-3
No files matched your search
@@ -28,6 +28,7 @@
|
||||
use App\Filament\Resources\RightsProfiles\Pages\ViewRightsProfile;
|
||||
use App\Filament\Resources\Users\Pages\ListUsers;
|
||||
use App\Filament\Support\Bestand;
|
||||
use App\Filament\Support\EditorialCatalog;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Livewire\Livewire;
|
||||
@@ -115,6 +116,10 @@ public function test_active_filters_are_named_and_removable_and_the_list_grows_i
|
||||
->assertDontSee('Modul 51')
|
||||
->call('mehrAnzeigen')
|
||||
->assertSee('Modul 53')
|
||||
->mountAction('createModule')
|
||||
->set('mountedActions.0.data.designation', 'Noch nicht angelegt')
|
||||
->assertSet('bestandGrenze', 2 * Bestand::SCHRITT)
|
||||
->unmountAction()
|
||||
->set('query', 'Modul 5')
|
||||
->assertSet('bestandGrenze', Bestand::SCHRITT)
|
||||
->assertSee('Suche: „Modul 5“')
|
||||
@@ -361,6 +366,51 @@ public function test_pillars_combinations_and_accounts_use_the_same_list(): void
|
||||
->assertDontSee($editor->email);
|
||||
}
|
||||
|
||||
public function test_changing_an_offer_keeps_terms_the_mask_does_not_show(): void
|
||||
{
|
||||
$content = app(ContentService::class);
|
||||
$articles = app(ArticleService::class);
|
||||
$offers = app(OfferService::class);
|
||||
$sheet = $content->publishElementVersion($content->createElement('pdf', 'pdf', 'Merkblatt'), 'Hinweis');
|
||||
$article = $articles->create('demo-merkblatt', 'Erprobung');
|
||||
$articles->publishRelease($article, $sheet, 'A.');
|
||||
$rights = $offers->createRightsProfile('Lesen', 'institutionell', ['pdf' => ['ansehen']]);
|
||||
$offer = $offers->create('Für Einrichtungen');
|
||||
$offers->activate($offer, [['target' => $article->fresh(), 'rights' => $rights]], [
|
||||
'grant_kind' => 'kauf', 'price_cents' => 900, 'holder_kind' => 'organisation',
|
||||
'term_rule' => 'befristet', 'tax_class' => 'ermaessigt', 'dynamic' => true,
|
||||
]);
|
||||
|
||||
Livewire::actingAs($this->keeper(), 'staff')
|
||||
->test(ViewOffer::class, ['record' => $offer->getKey()])
|
||||
->mountAction('activate')
|
||||
->fillForm(['price_cents' => 1200])
|
||||
->callMountedAction()
|
||||
->assertHasNoFormErrors()
|
||||
->assertSee('Fassung 2 aktiv · Kauf · 12,00 €');
|
||||
|
||||
$second = $offer->versions()->where('number', 2)->firstOrFail();
|
||||
$this->assertSame('organisation', $second->holder_kind);
|
||||
$this->assertSame('befristet', $second->term_rule);
|
||||
$this->assertSame('ermaessigt', $second->tax_class);
|
||||
$this->assertTrue((bool) $second->dynamic);
|
||||
}
|
||||
|
||||
public function test_a_combination_opens_its_structure_and_its_editorial_desk_from_the_list(): void
|
||||
{
|
||||
$combination = app(ContentService::class)->createComposition('Materialsatz Alltag', CompositionKind::Kombination);
|
||||
$editor = $this->editor();
|
||||
$url = EditorialCatalog::editUrl($combination);
|
||||
|
||||
Livewire::actingAs($editor, 'staff')
|
||||
->test(ListCombinations::class)
|
||||
->assertSeeHtml('href="'.$url.'"')
|
||||
->assertSeeHtml('href="'.$url.'?redaktion=1"');
|
||||
|
||||
$this->actingAs($editor, 'staff')->get($url)->assertOk()->assertSee('Materialsatz Alltag');
|
||||
$this->actingAs($editor, 'staff')->get($url.'?redaktion=1')->assertOk()->assertSee('Redaktion speichern');
|
||||
}
|
||||
|
||||
private function keeper(): User
|
||||
{
|
||||
$keeper = User::factory()->katalogverwalter()->create();
|
||||
|
||||
Reference in new issue
Block a user