Skip to content

fix: adapt edit-message-github-diff test to sidebar reorganization#652

Open
empiricalrun[bot] wants to merge 8 commits intomainfrom
chat-session_Y2SuZTJw1WXJ
Open

fix: adapt edit-message-github-diff test to sidebar reorganization#652
empiricalrun[bot] wants to merge 8 commits intomainfrom
chat-session_Y2SuZTJw1WXJ

Conversation

@empiricalrun
Copy link
Copy Markdown
Contributor

@empiricalrun empiricalrun Bot commented Jan 22, 2026

Summary

This PR fixes the failing test edit message twice, wait for str_replace tool, and verify single commit via GitHub API in tests/edit-message-github-diff.spec.ts which broke due to sidebar reorganization changes on the claude/slack-add-sidenav-grouping branch.

Root Cause

The sidebar reorganization removed the workspace-specific "Sessions" link, leaving only one global "Sessions" link. Additionally, the session URL format changed from path-based (/sessions/77894) to query-based (/sessions?id=77894).

Changes Made

  1. Line 15: Removed .nth(1) from Sessions link selector since there's now only one Sessions link in the sidebar

    // Before
    await page.getByRole('link', { name: 'Sessions', exact: true }).nth(1).click();
    
    // After  
    await page.getByRole('link', { name: 'Sessions', exact: true }).click();
  2. Line 21-22: Updated the new session button selector - the "+" button no longer has an accessible name, so we use a positional selector

    // Note: The "+" button doesn't have an accessible name, so we use positional selector
    await page.getByRole('button').nth(5).click();
  3. Line 27: Updated the URL assertion to match both old and new URL formats

    // Before
    await expect(page).toHaveURL(/sessions\//, { timeout: 10000 });
    
    // After (matches /sessions/ID or /sessions?id=ID)
    await expect(page).toHaveURL(/sessions(\?id=|\/)\d+/, { timeout: 10000 });

Test Results

✅ Test passes after changes: Report URL

The test completes successfully in ~85 seconds and correctly:

  • Navigates to Sessions page
  • Creates a new session with initial prompt
  • Waits for tool execution
  • Edits message and verifies single commit via GitHub API

Related

  • Failed Test Run: #45744 (Jan 22, 07:55 UTC)
  • Last Successful Run before changes: #45666 (Jan 21, 18:44 UTC)
  • Build: claude/slack-add-sidenav-grouping branch

PR created from session #72258

Updated at 2026-01-22 08:20:34.259 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