feat: ship creator journey v2 and profile updates

This commit is contained in:
2026-04-12 21:42:07 +02:00
parent a2457f4e49
commit d5cff21ea2
335 changed files with 20147 additions and 1545 deletions

View File

@@ -0,0 +1,36 @@
<?php
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Inertia\Testing\AssertableInertia;
uses(RefreshDatabase::class);
it('exposes mascot and cover art urls for upload content types', function () {
$contentTypeId = DB::table('content_types')->insertGetId([
'name' => 'Digital Art',
'slug' => 'digital-art',
'description' => 'Digital art uploads',
'order' => 1,
'mascot_path' => 'content-types/digital-art/mascot.webp',
'cover_art_path' => 'content-types/digital-art/cover.webp',
'created_at' => now(),
'updated_at' => now(),
]);
expect($contentTypeId)->toBeInt();
$user = User::factory()->create();
$this->actingAs($user)
->get('/upload')
->assertOk()
->assertInertia(fn (AssertableInertia $page) => $page
->component('Upload/Index')
->has('content_types', 1)
->where('content_types.0.slug', 'digital-art')
->where('content_types.0.mascot_url', rtrim((string) config('cdn.files_url'), '/') . '/content-types/digital-art/mascot.webp')
->where('content_types.0.cover_art_url', rtrim((string) config('cdn.files_url'), '/') . '/content-types/digital-art/cover.webp')
);
});