Skip to content

✅ test: admin 컴포넌트 테스트 코드 추가 #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

junyeokk
Copy link
Collaborator

@junyeokk junyeokk commented Jan 22, 2025

🔨 테스크

  • admin/layout 컴포넌트 테스트 코드 추가
  • admin/login 컴포넌트 테스트 코드 추가
  • admin/rss 컴포넌트 테스트 코드 추가
  • admin/tabs 컴포넌트 테스트 코드 추가

📋 작업 내용

📷 스크린 샷

테스트 커버리지

All Files

image

components/admin/layout

image

components/admin/login

image

components/admin/rss

image

components/admin/tabs

image

@junyeokk junyeokk marked this pull request as draft January 22, 2025 07:17
@junyeokk junyeokk changed the title Test/admin components ✅ test: admin 컴포넌트 테스트 코드 추가 Jan 22, 2025
@junyeokk junyeokk marked this pull request as ready for review January 22, 2025 15:59
@junyeokk junyeokk requested a review from jungmyunggi January 22, 2025 15:59
@junyeokk junyeokk added the ✅ Test 테스트 관련 (storybook, vitest, jest 등) label Jan 23, 2025
@junyeokk junyeokk requested a review from Copilot February 27, 2025 06:49
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds comprehensive test coverage for the admin components including layout, login, RSS, and tabs. The key changes include tests for UI interactions, error handling and component rendering, and updates to mocks for dropdown menu and icons.

Reviewed Changes

File Description
client/src/tests/components/common/admin/layout/AdminTabs.test.tsx Tests for AdminTabs covering loading, error, and action events.
client/src/tests/components/common/admin/rss/RssSearchBar.test.tsx Tests validating input handling and initial search parameter rendering.
client/src/tests/components/common/admin/login/AdminLoginModal.test.tsx Tests verifying login form behavior on success and failure.
client/src/tests/components/common/admin/layout/AdminHeader.test.tsx Tests ensuring proper rendering and functionality of the header components.
client/src/tests/components/common/admin/layout/AdminNavigationMenu.test.tsx Tests for tab selection behavior in the navigation menu.
client/src/tests/components/common/admin/rss/RssResponseCard.test.tsx Tests checking proper rendering of the RSS response card details.
client/src/tests/components/common/admin/layout/AdminMember.test.tsx Tests for admin member registration workflows and password toggle functionality.
client/src/tests/components/common/admin/rss/RejectModal.test.tsx Tests for rejection modal behavior and UI responses.
client/src/tests/mocks/components/ui/DropdownMenu.tsx Adds/updates dropdown menu mocks for testing purposes.
client/src/tests/mocks/external/lucide-react.tsx Updates lucide-react mocks to include additional icons.
client/src/components/admin/layout/AdminHeader.tsx Minor changes to include test IDs for the logout process.
client/src/components/admin/login/AdminLoginModal.tsx Updated import style for FormInput to match module exports.
client/src/tests/setup.tsx Updated setup to include the DropdownMenu mock.

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

client/src/tests/components/common/admin/layout/AdminMember.test.tsx:46

  • [nitpick] The accessible name "Toggle bold" for the password visibility toggle is ambiguous and may not clearly convey its purpose. Consider using a more descriptive label such as "Show/Hide Password".
const toggleButton = screen.getByRole("button", { name: "Toggle bold" });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Test 테스트 관련 (storybook, vitest, jest 등)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant