Seed DemoWorld business, staff, and guest continuity for Meet demos
Deploy Ladill Meet / deploy (push) Successful in 2m10s

Organization and branch names now come from DemoWorld business/branch
catalogs, meet-role staff are mirrored as Members by email until SSO
remaps to public_id, and guest participants use DemoWorld people for
cross-app continuity. Staff logins skip the login reseed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 13:36:22 +00:00
co-authored by Cursor
parent b0590842a4
commit 1157c1c23a
4 changed files with 655 additions and 10 deletions
+36
View File
@@ -9,6 +9,7 @@ use App\Models\Participant;
use App\Models\Room;
use App\Models\Session;
use App\Models\User;
use App\Support\DemoWorld;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
use Tests\TestCase;
@@ -118,4 +119,39 @@ class DemoSeedCommandTest extends TestCase
'slug' => 'other-org',
]);
}
public function test_pro_seed_uses_demo_world_business_staff_and_guests(): void
{
$user = User::create([
'public_id' => 'meet-demo-pro-continuity',
'name' => 'Meet Demo Pro',
'email' => 'demo-pro@ladill.com',
]);
$this->artisan('demo:seed', ['identity' => $user->email, '--plan' => 'pro'])
->assertSuccessful();
$org = Organization::query()->where('owner_ref', $user->public_id)->first();
$this->assertSame(DemoWorld::business('pro')['name'], $org->name);
$this->assertDatabaseHas('meet_branches', [
'organization_id' => $org->id,
'name' => DemoWorld::branches('pro')[0]['name'],
]);
$this->assertDatabaseHas('users', ['email' => 'demo-pro-sales@ladill.com']);
$this->assertDatabaseHas('meet_members', [
'organization_id' => $org->id,
'user_ref' => 'demo-pro-sales@ladill.com',
'role' => 'member',
]);
$firstGuest = DemoWorld::people(1)[0];
$this->assertTrue(
Participant::query()
->where('owner_ref', $user->public_id)
->where('email', $firstGuest['email'])
->exists()
);
}
}