Skip to content
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

test: ConnectModal components test coverage #483

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

thinkasany
Copy link
Collaborator

No description provided.

Copy link

changeset-bot bot commented Jan 10, 2024

🦋 Changeset detected

Latest commit: 7d62342

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

This PR includes changesets to release 1 package
Name Type
@ant-design/web3 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

vercel bot commented Jan 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2024 11:55am

Copy link

github-actions bot commented Jan 10, 2024

'@ant-design/web3': patch
---

test:connect-modal components test coverage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
test:connect-modal components test coverage
test: ConnectModal components test coverage

const App = () => <DefaultGuidePanel guide={Guide as unknown as DefaultGuide} />;
const { baseElement } = render(<App />);
// Show icon only if icon is string
expect(baseElement.querySelector('.ant-web3-connect-modal-guide-item-icon')).toBeNull();
Copy link
Collaborator

Choose a reason for hiding this comment

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

icon 是 ReactNode 的时候应该也要能展示,比如是一个 svg 的时候。

Copy link
Collaborator Author

@thinkasany thinkasany Jan 10, 2024

Choose a reason for hiding this comment

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

是会显示,但是这边组件内部的逻辑是ant-web3-connect-modal-guide-item-icon 这个classname只有在是icon是url的时候才显示。
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

想了想原来的数字确实不太合适,现在换成了web3-icons

@thinkasany thinkasany changed the title test:connect-modal components test coverage test: ConnectModal components test coverage Jan 10, 2024
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (879548d) 99.33% compared to head (7d62342) 99.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #483      +/-   ##
==========================================
+ Coverage   99.33%   99.54%   +0.21%     
==========================================
  Files          92       92              
  Lines        4216     4216              
  Branches      430      433       +3     
==========================================
+ Hits         4188     4197       +9     
+ Misses         27       18       -9     
  Partials        1        1              

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

@yutingzhao1991 yutingzhao1991 merged commit 0d69a01 into ant-design:main Jan 10, 2024
8 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.

2 participants