* WIP: Fixes #260. Autofocus password input field. Press tab after enter password to switch focus to submit * feat: Clicks Submit Transaction when user presses Enter after entering password * fix: Remove console logs and no need to focus * test: Add test setup. setState not changing currentItem from undefined * fix: Change tabIndex values to number instead of string * fix: Use Refs instead of JS DOM access * fix: Add missing newline * test: Test modal show after setState. Skipped pending resolution of Enzyme issue * fix: Remove string from tabIndex prop type * fix: Remove use of SUIEvent. Use React refs not HTML DOM queries * test: Update tests but skipping since awaiting resolution of enzyme issue Reference: https://github.com/airbnb/enzyme/issues/1794 * WIP * fix: Simply call onSend instead of long-winded approach with Refs * test: Fix tests to use promises instead of callbacks * fix: Fix tslint error to handle promises correctly * fix: Remove return since broke functionality. Use await to handle promise. Use key instead of keyCode
13 lines
340 B
JavaScript
13 lines
340 B
JavaScript
// Copyright 2017-2018 @polkadot authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the ISC license. See the LICENSE file for details.
|
|
|
|
const Adapter = require('enzyme-adapter-react-16');
|
|
const Enzyme = require('enzyme');
|
|
|
|
Enzyme.configure({
|
|
adapter: new Adapter()
|
|
});
|
|
|
|
module.exports = Enzyme;
|