Skip to content

Change some test code using getByTestId #2649

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

Merged
merged 9 commits into from
Jun 9, 2025
Merged

Change some test code using getByTestId #2649

merged 9 commits into from
Jun 9, 2025

Conversation

yangwooseong
Copy link
Collaborator

Self Checklist

  • I wrote a PR title in English and added an appropriate label to the PR.
  • I wrote the commit message in English and to follow the Conventional Commits specification.
  • I added the changeset about the changes that needed to be released. (or didn't have to)
  • I wrote or updated documentation related to the changes. (or didn't have to)
  • I wrote or updated tests related to the changes. (or didn't have to)
  • I tested the changes in various browsers. (or didn't have to)
    • Windows: Chrome, Edge, (Optional) Firefox
    • macOS: Chrome, Edge, Safari, (Optional) Firefox

Related Issue

  • None

Summary

  • 테스트 코드에서 getByTestId 를 사용하는 부분을 getByRole 이나 getByText 로 변경합니다.

Details

  • testing-library 문서에 따르면 getByTestId 는 유저가 듣거나 볼 수 없는 엘리먼트에 대해서 사용해야 하는, 가장 지양해야하는 쿼리 함수입니다. 따라서 getByRole 이나 getByText 를 사용하고 test-id 는 deprecated 처리합니다.
  • Divider 에 role="separator" 를 추가합니다.
  • TextField나 Tag의 delete button 에 aria-label 을 추가합니다.

Breaking change? (Yes/No)

  • No

References

@yangwooseong yangwooseong self-assigned this Jun 2, 2025
@yangwooseong yangwooseong requested a review from sungik-choi as a code owner June 2, 2025 07:07
@yangwooseong yangwooseong added enhancement Issues or PR related to making existing features better a11y Issue or PR related to accessibility labels Jun 2, 2025
Copy link

channeltalk bot commented Jun 2, 2025

Copy link

changeset-bot bot commented Jun 2, 2025

🦋 Changeset detected

Latest commit: 55a44a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@channel.io/bezier-react Patch
bezier-figma-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.22%. Comparing base (b50ed53) to head (55a44a0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ckages/bezier-react/src/components/Emoji/Emoji.tsx 0.00% 1 Missing ⚠️
.../bezier-react/src/components/NavGroup/NavGroup.tsx 0.00% 1 Missing ⚠️
...es/bezier-react/src/components/NavItem/NavItem.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2649      +/-   ##
==========================================
- Coverage   80.33%   79.22%   -1.11%     
==========================================
  Files         145      145              
  Lines        2888     2869      -19     
  Branches      914      920       +6     
==========================================
- Hits         2320     2273      -47     
- Misses        534      592      +58     
+ Partials       34        4      -30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

'@channel.io/bezier-react': patch
---

Add a11n related properties to Divider, Tag, and TextField components
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Add a11n related properties to Divider, Tag, and TextField components
Add a11y related properties to Divider, Tag, and TextField components

아마 a11y 가 맞을 거 같아요

@yangwooseong yangwooseong merged commit 4d17edd into main Jun 9, 2025
3 of 5 checks passed
@yangwooseong yangwooseong deleted the web-8321 branch June 9, 2025 00:45
sungik-choi pushed a commit that referenced this pull request Jun 13, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @channel.io/[email protected]

### Patch Changes

- Fix infinite type recursion of Checkbox that occurs in TS 5.6+
([#2654](#2654)) by
@dohyun-ko

- Add a11y related properties to Divider, Tag, and TextField components
([#2649](#2649)) by
@yangwooseong

## [email protected]

### Patch Changes

-   Updated dependencies
    -   @channel.io/[email protected]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issue or PR related to accessibility enhancement Issues or PR related to making existing features better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants