Skip to content

feat: update Badge #2419

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 2 commits into from
Jul 7, 2020
Merged

Conversation

liulinboyi
Copy link
Contributor

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.
  2. Resolve what problem.
  3. Related issue link.

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
  2. List final API realization and usage sample.
  3. GIF or snapshot should be provided if includes UI/interactive modification.

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. English description
  2. Chinese description (optional)

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@tangjinzhou
Copy link
Member

?

@liulinboyi liulinboyi marked this pull request as ready for review June 16, 2020 11:07
@liulinboyi
Copy link
Contributor Author

?

最近有些事,这个没来得及兼容,现在兼容完了

@liulinboyi
Copy link
Contributor Author

@tangjinzhou Please help review, thanks!

@@ -129,7 +129,7 @@ const getComponent = (instance, prop, options = instance, execute = true) => {
};
const getComponentFromProp = (instance, prop, options = instance, execute = true) => {
Copy link
Member

Choose a reason for hiding this comment

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

首先感谢 pr,但期望能够做一些基本的测试 这个方法已经不使用了
使用 getComponent 替换
另外麻烦同步修改下相应单测
npm test -- /components/badge/tests/index.test.js -- watch

Copy link
Contributor Author

@liulinboyi liulinboyi Jun 19, 2020

Choose a reason for hiding this comment

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

首先感谢 pr,但期望能够做一些基本的测试 这个方法已经不使用了
使用 getComponent 替换
另外麻烦同步修改下相应单测
npm test -- /components/badge/tests/index.test.js -- watch

好的,没问题。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

首先感谢 pr,但期望能够做一些基本的测试 这个方法已经不使用了
使用 getComponent 替换
另外麻烦同步修改下相应单测
npm test -- /components/badge/tests/index.test.js -- watch

在写测试时,@vue/server-test-utils这个包没有Vue3的版本

import { render } from '@vue/server-test-utils';

image
提示版本不匹配

Copy link
Member

Choose a reason for hiding this comment

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

改成 mount

Copy link
Contributor Author

Choose a reason for hiding this comment

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

改成 mount

好的,我试一下。

import { mount } from '@vue/test-utils';
import Badge from '../index';
  it('badge dot not scaling count > 9', () => {
    const badge = {
      components: {Badge},
      template: '<Badge count="10" dot />',
    }
    const wrapper = mount(badge)
    expect(wrapper.findAll('.ant-card-multiple-words').length).toBe(0);
  });

"@vue/test-utils": "^2.0.0-alpha.6"

@tangjinzhou 是这样吗?谢谢!

Copy link
Member

Choose a reason for hiding this comment

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

如果能跑过就可以

Copy link
Contributor Author

Choose a reason for hiding this comment

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

如果能跑过就可以

好的。

@tangjinzhou tangjinzhou merged commit b32f34b into vueComponent:feat-vue3 Jul 7, 2020
@tangjinzhou
Copy link
Member

关注下这个对应改动 11d700c @liulinboyi

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants