actingAs($user); Filament::setTenant($tenant, true); $scopeKey = hash('sha256', 'scope-landing-comparison-info'); $baseline = InventorySyncRun::factory()->for($tenant)->create([ 'selection_hash' => $scopeKey, 'status' => InventorySyncRun::STATUS_SUCCESS, 'finished_at' => now()->subDays(2), ]); $current = InventorySyncRun::factory()->for($tenant)->create([ 'selection_hash' => $scopeKey, 'status' => InventorySyncRun::STATUS_SUCCESS, 'finished_at' => now()->subDay(), ]); Livewire::test(DriftLanding::class) ->assertSet('scopeKey', $scopeKey) ->assertSet('baselineRunId', (int) $baseline->getKey()) ->assertSet('currentRunId', (int) $current->getKey()) ->assertSet('baselineFinishedAt', $baseline->finished_at->toDateTimeString()) ->assertSet('currentFinishedAt', $current->finished_at->toDateTimeString()); });