fix(logs): start the log copy during the click so it works on iOS

Closes #9408

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-11-03 20:41:03 +01:00
co-authored by Claude Opus 5.5
parent 5431d4954d
commit 1ff99b0dc8
8 changed files with 102 additions and 63 deletions
@@ -1,7 +1,6 @@
<?php
use App\Enums\ApplicationDeploymentStatus;
use App\Livewire\Project\Application\DeploymentNavbar;
use App\Models\Application;
use App\Models\ApplicationDeploymentQueue;
use App\Models\Environment;
@@ -12,7 +11,6 @@ use App\Models\StandaloneDocker;
use App\Models\Team;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Livewire;
uses(RefreshDatabase::class);
@@ -72,17 +70,3 @@ test('deployment log lines show debug output to a resource team admin whose sess
expect($lines)->toContain('hidden-debug-line');
});
test('copied deployment logs hide debug output from a member after switching to a team they own', function () {
$this->actingAs($this->member);
session(['currentTeam' => $this->team]);
$component = Livewire::test(DeploymentNavbar::class, ['application_deployment_queue' => $this->deployment]);
session(['currentTeam' => $this->ownTeam]);
$markdown = $component->instance()->copyLogsToClipboard();
expect($markdown)->toContain('visible-line')
->not->toContain('hidden-debug-line');
});