<?php

use Illuminate\Support\Facades\Artisan;

it('keeps the relocated public and storage paths aligned with the app root', function (): void {
    expect(realpath(public_path()))->toBe(realpath(base_path('public')))
        ->and(realpath(storage_path()))->toBe(realpath(base_path('storage')))
        ->and(is_dir(public_path('build')))->toBeTrue()
        ->and(is_dir(storage_path('logs')))->toBeTrue();
});

it('boots the queue worker command from the relocated app root', function (): void {
    $exitCode = Artisan::call('help', ['command_name' => 'queue:work']);

    expect($exitCode)->toBe(0)
        ->and(Artisan::output())->toContain('queue:work');
});

it('keeps the runtime smoke routes registered after relocation', function (): void {
    expect(route('filament.admin.pages.choose-workspace', absolute: false))->toBe('/admin/choose-workspace')
        ->and(url('/system'))->toEndWith('/system')
        ->and(url('/up'))->toEndWith('/up');
});
