Skip to content

Stale insta snapshots in tui_main::render_impl::tests (6 failing, branch name leaked) #439

Description

@JDonaghy

Problem

Once the binary-test build is unbroken (see sibling issue for `render.rs` test compile), 6 snapshot tests under `tui_main::render_impl::tests` fail:

  • `snapshot_command_line`
  • `snapshot_insert_mode`
  • `snapshot_line_numbers`
  • `snapshot_normal_mode`
  • `snapshot_split_panes`
  • `snapshot_visual_selection`

Status-bar diff (example, `snapshot_insert_mode`):

```

  • INSERT  [No Name]  issue-385-appshell-side Ln 1, Col 1
    
  • INSERT  [No Name]    󰘖 utf-8 LF Spaces: 4  Ln 1, Col 1
    

```

Two problems:

  1. Stale: the status bar now renders file-info icons (utf-8, LF, indent) instead of the git branch. The committed snapshots predate that rendering change.
  2. Environment-leaked: the OLD snapshot literally contains `issue-385-appshell-side` — whoever captured the snapshot ran `INSTA_UPDATE=1` on the `issue-385-appshell-side` branch and the git-branch portion of the status bar leaked into the fixture. Snapshots that depend on the current branch name will never pass cleanly in CI.

Fix sketch

  • Run `cargo insta accept` on a clean develop branch (after the compile fix lands) and inspect the 6 diffs to confirm the new status-bar shape is intended.
  • For env-leak: either stub out `git_branch` in the snapshot test setup, or change the test scaffolding to render with a fixed mock branch name. Otherwise the next person to run `INSTA_UPDATE` on a different branch re-introduces the same flake.

Surfaced by

PR #435 smoke gate (Session 382). Hidden until that PR's collateral test-compile fix exposed them.

Related

Sibling issue: render.rs test build broken — must land first.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguiUI/rendering

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions