Skip to content

Replace login and repository-header snapshots with behaviour assertions #3509

Closed

Description

@setchy

Context

Recent test cleanup removed the route, filter, footer, notification-row, and sidebar snapshots (#3505, #3506, #3507). The largest remaining snapshots are now the login screens and the repository header:

  • src/renderer/routes/__snapshots__/Login.test.tsx.snap — 418 lines
  • src/renderer/routes/github/__snapshots__/LoginWithOAuthApp.test.tsx.snap — 485
  • src/renderer/routes/github/__snapshots__/LoginWithPersonalAccessToken.test.tsx.snap — 475
  • src/renderer/routes/gitlab/__snapshots__/LoginWithPersonalAccessToken.test.tsx.snap — 467
  • src/renderer/routes/gitea/__snapshots__/LoginWithPersonalAccessToken.test.tsx.snap — 445
  • src/renderer/routes/bitbucket/__snapshots__/LoginWithPersonalAccessToken.test.tsx.snap — 444
  • src/renderer/components/notifications/__snapshots__/RepositoryHeader.test.tsx.snap — 516

These screens are already covered by the visual regression suite, so the snapshots mostly duplicate pixel coverage while churning on every markup change.

Scope

Replace toMatchSnapshot() in those files with behaviour/structure assertions:

  • Login screens: heading, hostname/token fields, submit button, disabled states, error banners, navigation callbacks.
  • Repository header: repository name, notification count, mark-as-read/done actions, collapse toggle title/state, error/read opacity state.

Delete the corresponding .snap files.

Acceptance criteria

  • No toMatchSnapshot() remains in the listed files.
  • Assertions use roles/labels where possible rather than markup structure.
  • pnpm test and pnpm exec vp check --no-fmt pass.
  • Visual baselines remain unchanged.

Activity

  1. added
    refactor
    test
    on Oct 25, 2026
  2. added theissue type on Oct 25, 2026
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

    refactortest

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions