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
Conversation
There was a problem hiding this 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?
Deploy preview for ant-design ready! Built with commit 1e33f88 |
ci broken |
@afc163 test broken and it's success) |
wrapper.simulate('click'); | ||
expect(wrapper.hasClass('ant-btn-loading')).toBe(false); | ||
expect(wrapper.render().hasClass('ant-btn-loading')).toBe(true); |
There was a problem hiding this comment.
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.
馃 This is a ...
馃敆 Related issue link
nothing
馃挕 Background and solution
When i explore ant components i
m 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. I
m 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
馃摑 Changelog
鈽戯笍 Self Check before Merge