Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAutofill should focus on first entry Fix #8280 #8510
Conversation
| @@ -136,7 +138,7 @@ class AutofillAddressPanel extends ImmutableComponent { | |||
| )} | |||
| data-test-id='nameOnAddress' | |||
| spellCheck='false' onKeyDown={this.onKeyDown} onChange={this.onNameChange} | |||
| value={this.props.currentDetail.get('name')} | |||
| value={this.props.currentDetail.get('name') || ''} | |||
This comment has been minimized.
This comment has been minimized.
kumarrishav
Apr 26, 2017
•
Author
Contributor
I added default value as {this.props.currentDetail.get('name') || ''} to avoid the warning (because of react 15 upgrade).
warning.js?8a56:36
Warning: AutofillAddressPanel is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components.
| @@ -115,7 +118,7 @@ class AutofillCreditCardPanel extends ImmutableComponent { | |||
| spellCheck='false' | |||
| onKeyDown={this.onKeyDown} | |||
| onChange={this.onNameChange} | |||
| value={this.props.currentDetail.get('name')} | |||
| value={this.props.currentDetail.get('name') || ''} | |||
This comment has been minimized.
This comment has been minimized.
|
@kumarrishav could you also add test to |
|
@darkdh will test/contents/autofillTest.js be right place to test this? As name suggests this is to test the content in input field. I tried to find autofill related test test/app/renderer/components/ but couldn't find any. |
|
@kumarrishav you can add test there for now. All the autofill tests are in |
|
@darkdh sure will do. |
|
sorry for the inconvenience. please do the following steps
|
|
@darkdh sorry it failed again.
/Users/krishav/Documents/FOSS/Brave/browser-laptop/node_modules/bindings/bindings.js:83 Error: The module '/Users/krishav/Documents/FOSS/Brave/browser-laptop/node_modules/leveldown/build/Release/leveldown.node' |
|
why this version issue is happening? |
|
@kumarrishav it is because we have different ABI version. Please contain this commit 576921b and try again. |
|
@darkdh this fixes the issue. |
|
@darkdh I am not sure how to test the 'focus' thing in integration test. Also, i am getting this error while running test. I think unit test is right place to test it. |
|
@kumarrishav please rebase to master and try again. There will be some intermittent errors but at least |
|
@darkdh sorry, but still same error. It fails at beforeEach hook. Though it fills the form, but fails at first it.('adds an autofill address' function * () {}) itself |
|
@kumarrishav I just try running test on the master and it's working for me |
|
@kumarrishav to run webdriver test open a console, run |
|
@kumarrishav you can also run |
|
Sorry @darkdh Still same error. Don't know why it's not working in my system (Mac OS, Node -v : 7.9.0 and npm 4.2.0). Can we move this test later to UT (and file another issue for same) |
Auditors: @kumarrishav, @bsclifton
|
@kumarrishav , I've added the test in d1f502a |
|
Changes look great! Tested manually and also ran |
|
Thanks, @kumarrishav! |



kumarrishav commentedApr 26, 2017
•
edited by bsclifton
Test Plan:
Description
Fix #8280
git rebase -ito squash commits (if needed).