create(); $workspace = Workspace::factory()->create(['user_id' => $user->id]); $workspace->members()->attach($user->id, ['role' => Role::Member->value]); $user->update(['current_workspace_id' => $workspace->id]); $automation = Automation::factory()->create(['workspace_id' => $workspace->id]); $this->actingAs($user); $page = visit(route('app.automations.workflow', $automation))->resize(375, 812); $page->script(<<<'JS' (async () => { const sel = '[data-testid="automation-mobile-notice"]'; for (let i = 0; i < 100; i++) { const el = document.querySelector(sel); if (el && el.getBoundingClientRect().height > 0) return; await new Promise((r) => setTimeout(r, 50)); } })(); JS); $page->assertVisible('@automation-mobile-notice'); });