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

fix(date-picker): merge origin input and popup input focus #15423

Closed
wants to merge 1 commit into from
Closed

fix(date-picker): merge origin input and popup input focus #15423

wants to merge 1 commit into from

Conversation

Yangzhedi
Copy link
Contributor

🤔 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?

fix#11249
add test for shared/focusTest.js

@netlify
Copy link

netlify bot commented Mar 15, 2019

Deploy preview for ant-design ready!

Built with commit 4518416

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

@Yangzhedi
Copy link
Contributor Author

i add a onFocus trigger only once test
cased by

Cascader › focus and blur › focus() and onFocus trigger only once

    expect(jest.fn()).toBeCalledTimes(1)

    Expected mock function to have been called one time, but it was called two times.

      35 |       wrapper.instance().focus();
      36 |       jest.runAllTimers();
    > 37 |       expect(handleFocus).toBeCalledTimes(1);
         |                           ^
      38 |     });
      39 | 
      40 |     it('blur() and onBlur', () => {

      at Object.toBeCalledTimes (tests/shared/focusTest.js:37:27)

@@ -21,6 +21,7 @@ export interface PickerProps {

export interface PickerState {
open: boolean;
hadFocus: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use hasFocus?

@afc163
Copy link
Member

afc163 commented Aug 5, 2019

ci broken

@yoyo837
Copy link
Contributor

yoyo837 commented Mar 17, 2020

ping

@afc163
Copy link
Member

afc163 commented May 23, 2020

close for no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants