Skip to content

refactor: extract navigateToToolsTab helper to pages/sessions.ts#890

Open
empiricalrun[bot] wants to merge 7 commits intomainfrom
chat-session_mKvhvbNS9wkF
Open

refactor: extract navigateToToolsTab helper to pages/sessions.ts#890
empiricalrun[bot] wants to merge 7 commits intomainfrom
chat-session_mKvhvbNS9wkF

Conversation

@empiricalrun
Copy link
Copy Markdown
Contributor

@empiricalrun empiricalrun Bot commented May 1, 2026

Summary

Identified that page.getByRole('tab', { name: 'Tools', exact: true }).click() was inlined 13 times across 3 spec files without being abstracted into a reusable helper.

Change

Added a single navigateToToolsTab(page: Page) helper to tests/pages/sessions.ts and replaced all inline usages across:

  • tests/tool-execution/session.spec.ts — 11 occurrences (with both page and sessionPage)
  • tests/issues.spec.ts — 1 occurrence
  • tests/my-sessions.spec.ts — 1 occurrence

Why this is the right place

tests/pages/sessions.ts already houses all session-detail navigation helpers (navigateToSessions, openReviewPanel, waitForFirstMessage, etc.). The Tools tab is a core part of the session detail view, making this a natural fit.

No functional change

This is a pure refactor — no test logic was modified, only the navigation call was extracted to a named helper.

PR created from session #127322

Updated at 2026-05-01 04:56:38.190 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants