feat: add display_cart_item_images feature to tenants and update related resources

This commit is contained in:
2026-08-18 16:46:45 -03:00
parent 817d0de6d2
commit 8e26611097
13 changed files with 136 additions and 5 deletions

View File

@@ -75,6 +75,21 @@ class CartControllerTest extends TestCase
]);
}
public function test_it_filters_item_images_when_the_tenant_disables_them(): void
{
$tenant = $this->createTenant('acme');
$tenant->update(['display_cart_item_images' => false]);
$item = $this->createDirectItem($tenant, 10, '49.90');
$item->attachments()->attach($this->createAttachment('cart-item'), ['orden' => 0]);
$this->postJson('/api/tenants/acme/cart/items', [
'catalog_item_id' => $item->id,
'cantidad' => 1,
])
->assertOk()
->assertJsonPath('data.items.0.imagen', null);
}
public function test_it_adds_a_specific_variant_and_merges_repeated_additions(): void
{
$tenant = $this->createTenant('acme');