Skip to content

test(components): add unit tests for BlockChip #125 - #174

Merged
GiZano merged 1 commit into
ClimbStack:mainfrom
Gheb6:feat/issue-125-block-chip-tests
Oct 14, 2026
Merged

GiZano merged 1 commit into
ClimbStack:mainfrom
Gheb6:feat/issue-125-block-chip-tests

Conversation

@Gheb6

@Gheb6 Gheb6 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

This pull request description was written by an AI agent.

Summary

Adds comprehensive unit and component tests for BlockChip (src/components/BlockChip.tsx) achieving 100% line, branch, and statement coverage.

  • Verifies rendering of block name with single-line limit and formatted duration hours (including decimal hours).
  • Tests chip container styling (left border color, tinted background color, and padding/radius styles).
  • Tests category vector icon rendering with category color.
  • Tests incomplete state: full opacity (1), no checkmark, normal name styling.
  • Tests completed state: reduced opacity (0.5), check-bold vector icon with success color, and strikethrough name styling (line-through).
  • Tests optional description prop: rendering with single-line limit and italic font style when present, and omitting when undefined or empty.
  • Tests user interactions: triggering onPress callback when pressing the chip or its text.
  • Tests light and dark theme text and icon colors.

Closes #125

AI Generation Disclosure

  • Tool / Agent: Antigravity with Gemini 3.8 Flash
  • Files generated:
    • src/components/__tests__/BlockChip.test.tsx (all lines)

…erated)

Add comprehensive unit and component tests for BlockChip covering rendering, category styling, duration formatting, done state, description prop, onPress interactions, and theming.

Resolves ClimbStack#125
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@GiZano
GiZano merged commit eb61c53 into ClimbStack:main Oct 14, 2026
4 checks passed
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.

[FEAT] Add tests for src/components/BlockChip.tsx

2 participants