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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA: Button loading prop as object feature #19213

Closed
wants to merge 1 commit into from
Closed

QA: Button loading prop as object feature #19213

wants to merge 1 commit into from

Conversation

akaguny
Copy link
Contributor

@akaguny akaguny commented Oct 14, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Explore Button component

馃敆 Related issue link

nothing

馃挕 Background and solution

When i explore ant components im find loading.delay prop in Button component, but it i think is not usefully. And i went to unit tests to explain how it works correctly. But now i don't lnow this. Im suggest to delete this api sometime.
Help to explain pls.
If it`s really usefully i suggest to add usage example in next PR to ant. And i want improve unit-test because now without render i thing they is nit correct.

I make some example in codesandbox based on unit test wrapper component
https://codesandbox.io/embed/button-with-delay-loading-upyrs
screen-capture-1

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 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

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

@netlify
Copy link

netlify bot commented Oct 14, 2019

Deploy preview for ant-design ready!

Built with commit 1e33f88

https://deploy-preview-19213--ant-design.netlify.com

@buildsize
Copy link

buildsize bot commented Oct 14, 2019

File name Previous Size New Size Change
package-lock.json 906.16聽KB 911.49聽KB 5.33聽KB (1%)

@akaguny akaguny changed the title test(Button): check loading class with render, not only mount QA: check loading class with render, not only mount Oct 15, 2019
@auto-add-label auto-add-label bot added QA and removed test labels Oct 15, 2019
@akaguny akaguny changed the title QA: check loading class with render, not only mount QA: Button loading prop as object feature Oct 15, 2019
@afc163
Copy link
Member

afc163 commented Oct 29, 2019

ci broken

@akaguny
Copy link
Contributor Author

akaguny commented Nov 5, 2019

@afc163 test broken and it's success)
See question pleas

wrapper.simulate('click');
expect(wrapper.hasClass('ant-btn-loading')).toBe(false);
expect(wrapper.render().hasClass('ant-btn-loading')).toBe(true);
Copy link
Member

Choose a reason for hiding this comment

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

It should be false because we have a delayed loading. I think our loading prop of object type works correctly.

@afc163 afc163 closed this Dec 5, 2019
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.

None yet

2 participants