feat(storefront): configure checkout summary type
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace Tests\Feature\Seeders;
|
||||
|
||||
use App\Shared\Attachable\Models\Attachment;
|
||||
use App\Domains\Core\Tenant\Models\AdminWebsiteType;
|
||||
use App\Domains\Core\Tenant\Models\StorefrontWebsiteType;
|
||||
use App\Shared\Attachable\Models\Attachment;
|
||||
use Database\Seeders\WebsiteTypeSeeder;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@@ -54,6 +54,7 @@ class WebsiteTypeSeederTest extends TestCase
|
||||
Storage::disk('s3')->assertExists($shopIt->favicon->path);
|
||||
$shopItStorefront = StorefrontWebsiteType::query()->where('codigo', 'shopit')->with('extras')->sole();
|
||||
$this->assertSame('standard', $shopItStorefront->header_type);
|
||||
$this->assertSame(StorefrontWebsiteType::CHECKOUT_SUMMARY_DEFAULT, $shopItStorefront->checkout_summary_type);
|
||||
$this->assertSame(['carousel'], $shopItStorefront->extras->pluck('codigo')->all());
|
||||
$this->assertSame('Carrusel principal', $shopItStorefront->extras->sole()->nombre);
|
||||
$this->assertSame([
|
||||
@@ -87,8 +88,10 @@ class WebsiteTypeSeederTest extends TestCase
|
||||
$this->assertSame('onticket_favicon.svg', $onTicket->favicon->filename);
|
||||
$onTicketStorefront = StorefrontWebsiteType::query()->where('codigo', 'onticket')->with('extras')->sole();
|
||||
$this->assertSame('standard', $onTicketStorefront->header_type);
|
||||
$this->assertSame(StorefrontWebsiteType::CHECKOUT_SUMMARY_DEFAULT, $onTicketStorefront->checkout_summary_type);
|
||||
$multiEventStorefront = StorefrontWebsiteType::query()->where('codigo', 'onticket_multi_event')->with('extras')->sole();
|
||||
$this->assertSame('immersive', $multiEventStorefront->header_type);
|
||||
$this->assertSame(StorefrontWebsiteType::CHECKOUT_SUMMARY_EVENT, $multiEventStorefront->checkout_summary_type);
|
||||
$this->assertEqualsCanonicalizing(['immersiveHeroCarousel', 'immersiveHero'], $multiEventStorefront->extras->pluck('codigo')->all());
|
||||
$this->assertSame($shopItStorefront->extras->sole()->config_schema, $multiEventStorefront->extras->firstWhere('codigo', 'immersiveHeroCarousel')->config_schema);
|
||||
$this->assertEqualsCanonicalizing(
|
||||
|
||||
@@ -37,7 +37,8 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
->assertJsonCount(1, 'data.event_categories')
|
||||
->assertJsonPath('data.event_categories.0.id', $eventCategory->id)
|
||||
->assertJsonPath('data.event_categories.0.nombre', 'Música')
|
||||
->assertJsonPath('data.event_categories.0.subcategories', []);
|
||||
->assertJsonPath('data.event_categories.0.subcategories', [])
|
||||
->assertJsonPath('data.checkout_summary_type', StorefrontWebsiteType::CHECKOUT_SUMMARY_EVENT);
|
||||
}
|
||||
|
||||
public function test_it_bootstraps_a_tenant_by_domain(): void
|
||||
@@ -125,6 +126,7 @@ class BootstrapTenantControllerTest extends TestCase
|
||||
->assertJsonPath('data.checkout_editing_policy.allow_delete', false)
|
||||
->assertJsonPath('data.checkout_editing_policy.allow_update_quantity', false)
|
||||
->assertJsonPath('data.checkout_editing_policy.allow_update_variant', false)
|
||||
->assertJsonPath('data.checkout_summary_type', StorefrontWebsiteType::CHECKOUT_SUMMARY_DEFAULT)
|
||||
->assertJsonPath('data.display_cart_item_images', false)
|
||||
->assertJsonPath('data.header_bg_color', '#ffffff')->assertJsonPath('data.footer_bg_color', '#ffffff');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user