Skip to content

Commit a1ffbaf

Browse files
authored
Refactor: Replace ArchivedBadge with Flexible StatusBadge Component (#2444)
* Delete ArchivedBadge component and its tests * feat: Add StatusBadge component for repository status indication * feat: Replace ArchivedBadge with StatusBadge in DetailsCard and RepositoriesCard components * test: Update RepositoriesCard test to use StatusBadge and add StatusBadge tests * refactor: improve input handling and validation * test: Refactor StatusBadge tests for improved class assertion and update icon rendering * fix: Update tooltip and aria-label for archived status in StatusBadge component * test: Update StatusBadge tests to use SVG for icon rendering and adjust queries
1 parent 7f0e5fa commit a1ffbaf

File tree

7 files changed

+432
-249
lines changed

7 files changed

+432
-249
lines changed

frontend/__tests__/unit/components/ArchivedBadge.test.tsx

Lines changed: 0 additions & 205 deletions
This file was deleted.

frontend/__tests__/unit/components/RepositoriesCard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ describe('RepositoriesCard', () => {
245245
render(<RepositoriesCard repositories={[archivedRepo]} />)
246246

247247
const badge = screen.getByText('Archived')
248-
const icon = badge.querySelector('[data-testid="archive-icon"]')
248+
const icon = badge.querySelector('svg')
249249
expect(icon).not.toBeInTheDocument()
250250
})
251251

0 commit comments

Comments
 (0)