- Wired the checkout wizard for Google “comfort login”: added Socialite controller + dependency, new Google env
hooks in config/services.php/.env.example, and updated wizard steps/controllers to store session payloads, attach packages, and surface localized success/error states. - Retooled payment handling for both Stripe and PayPal, adding richer status management in CheckoutController/ PayPalController, fallback flows in the wizard’s PaymentStep.tsx, and fresh feature tests for intent creation, webhooks, and the wizard CTA. - Introduced a consent-aware Matomo analytics stack: new consent context, cookie-banner UI, useAnalytics/ useCtaExperiment hooks, and MatomoTracker component, then instrumented marketing pages (Home, Packages, Checkout) with localized copy and experiment tracking. - Polished package presentation across marketing UIs by centralizing formatting in PresentsPackages, surfacing localized description tables/placeholders, tuning badges/layouts, and syncing guest/marketing translations. - Expanded docs & reference material (docs/prp/*, TODOs, public gallery overview) and added a Playwright smoke test for the hero CTA while reconciling outstanding checklist items.
This commit is contained in:
@@ -10,6 +10,9 @@ use App\Models\TenantPackage;
|
||||
use App\Models\EventPackage;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
use App\Services\EventJoinTokenService;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class EventControllerTest extends TestCase
|
||||
{
|
||||
@@ -107,8 +110,7 @@ class EventControllerTest extends TestCase
|
||||
public function test_upload_exceeds_package_limit_fails(): void
|
||||
{
|
||||
$tenant = Tenant::factory()->create();
|
||||
$user = User::factory()->create(['tenant_id' => $tenant->id]);
|
||||
$event = Event::factory()->create(['tenant_id' => $tenant->id]);
|
||||
$event = Event::factory()->create(['tenant_id' => $tenant->id, 'status' => 'published']);
|
||||
$package = Package::factory()->create(['type' => 'endcustomer', 'max_photos' => 0]); // Limit 0
|
||||
EventPackage::factory()->create([
|
||||
'event_id' => $event->id,
|
||||
@@ -116,12 +118,15 @@ class EventControllerTest extends TestCase
|
||||
'used_photos' => 0,
|
||||
]);
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->postJson("/api/v1/events/{$event->slug}/photos", [
|
||||
'photo' => 'test-photo.jpg',
|
||||
Storage::fake('public');
|
||||
$token = app(EventJoinTokenService::class)->createToken($event);
|
||||
|
||||
$response = $this->withHeader('X-Device-Id', 'limit-test')
|
||||
->post("/api/v1/events/{$token->token}/upload", [
|
||||
'photo' => UploadedFile::fake()->image('limit.jpg'),
|
||||
]);
|
||||
|
||||
$response->assertStatus(402)
|
||||
->assertJson(['error' => 'Upload limit reached for this event']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user