* 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
14 lines
628 B
JavaScript
14 lines
628 B
JavaScript
const config = require('@polkadot/dev-react/config/jest');
|
|
|
|
module.exports = Object.assign({}, config, {
|
|
moduleNameMapper: {
|
|
'@polkadot/app-(accounts|addresses|democracy|example|explorer|extrinsics|rpc|staking|storage|toolbox|transfer|vanitygen)(.*)$': '<rootDir>/packages/ui-$1/src/$2',
|
|
'@polkadot/ui-(app|identicon|keyring|react-rx|react|signer)(.*)$': '<rootDir>/packages/ui-$1/src/$2',
|
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object',
|
|
'\\.(css|less)$': 'empty/object'
|
|
},
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!polkadot-identicon)'
|
|
]
|
|
});
|