Passe Tests an die abgeleitete Produktseite und den Kaufpreis als Pflicht an
CatalogRulesTest: Angebote ohne Preis und Vergabe nutzten den Standard „Kauf“; sie geben jetzt Preis oder die Vergabe „auf Abruf“ an, weil ein Kauf ohne Preis nicht aktiviert wird (ADR-52). CartTest, OfferOptionAdminTest: Die Seite einer Option kommt aus ProductOptions::pageUrl; die Auswahl „Produktseite“ gibt es nicht mehr. Keine Assertion wurde abgeschwächt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08f7d0c63d
commit
cce22ebd81
3 files changed
+10
-5
No files matched your search
@@ -5,6 +5,7 @@
|
||||
use App\Domain\Catalog\OfferStatus;
|
||||
use App\Domain\Commerce\Cart;
|
||||
use App\Domain\Commerce\CartLine;
|
||||
use App\Domain\Commerce\ProductOptions;
|
||||
use App\Filament\Resources\Offers\Pages\ListOffers;
|
||||
use App\Filament\Resources\Offers\Pages\ViewOffer;
|
||||
use App\Models\User;
|
||||
@@ -78,7 +79,7 @@ public function test_the_mask_is_prefilled_names_the_option_and_states_the_effec
|
||||
$this->assertStringContainsString('„Abbrechen“ verwirft die Eingaben', $description);
|
||||
$this->assertSame('Fassung 2 aktivieren', $action->getModalSubmitActionLabel());
|
||||
$this->assertSame('Privatlizenz', $data['option_label']);
|
||||
$this->assertSame((string) $offer->composition_id, (string) $data['composition_id']);
|
||||
$this->assertArrayNotHasKey('composition_id', $data, 'Die Produktseite wird nicht mehr zugeordnet, sie ergibt sich aus dem Artikel.');
|
||||
$this->assertSame('person', $data['holder_kind']);
|
||||
$this->assertSame('kauf', $data['grant_kind']);
|
||||
$this->assertSame('49,00', $data['price_euro'], 'Der Preis steht in Euro, nicht in Cent.');
|
||||
@@ -125,7 +126,7 @@ public function test_activating_changes_only_this_option_and_leaves_the_others_p
|
||||
$this->assertSame(1, $untouched->versions()->count());
|
||||
$this->assertNotNull(app(Cart::class)->purchasable($untouched));
|
||||
}
|
||||
$this->get(route('public.program', $offer->composition_id))
|
||||
$this->get(app(ProductOptions::class)->pageUrl($offer))
|
||||
->assertSee('39,00 €')
|
||||
->assertSee('Privatlizenz (neu)')
|
||||
->assertSee('149,00 €');
|
||||
|
||||
Reference in new issue
Block a user