1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00

Fix test descriptions and remove unnecessary proptypes.

This commit is contained in:
Dan 2018-05-10 07:37:33 -04:00
parent 9ccc609e56
commit f94ffa022c
5 changed files with 10 additions and 14 deletions

View File

@ -6,18 +6,11 @@ import GasFeeDisplay from '../../../send/gas-fee-display-v2'
export default class SendGasRow extends Component { export default class SendGasRow extends Component {
static propTypes = { static propTypes = {
closeFromDropdown: PropTypes.func,
conversionRate: PropTypes.number, conversionRate: PropTypes.number,
convertedCurrency: PropTypes.string, convertedCurrency: PropTypes.string,
from: PropTypes.string,
fromAccounts: PropTypes.array,
fromDropdownOpen: PropTypes.bool,
gasLoadingError: PropTypes.bool, gasLoadingError: PropTypes.bool,
gasTotal: PropTypes.string, gasTotal: PropTypes.string,
openFromDropdown: PropTypes.func,
showCustomizeGasModal: PropTypes.func, showCustomizeGasModal: PropTypes.func,
tokenContract: PropTypes.object,
updateSendFrom: PropTypes.func,
}; };
render () { render () {

View File

@ -9,7 +9,7 @@ import SendFromRow from '../send-from-row/send-from-row.container'
import SendGasRow from '../send-gas-row/send-gas-row.container' import SendGasRow from '../send-gas-row/send-gas-row.container'
import SendToRow from '../send-to-row/send-to-row.container' import SendToRow from '../send-to-row/send-to-row.container'
describe('Send Component', function () { describe('SendContent Component', function () {
let wrapper let wrapper
beforeEach(() => { beforeEach(() => {
@ -29,10 +29,10 @@ describe('Send Component', function () {
it('should render the correct row components as grandchildren of the PageContainerContent component', () => { it('should render the correct row components as grandchildren of the PageContainerContent component', () => {
const PageContainerContentChild = wrapper.find(PageContainerContent).children() const PageContainerContentChild = wrapper.find(PageContainerContent).children()
PageContainerContentChild.childAt(0).is(SendFromRow) assert(PageContainerContentChild.childAt(0).is(SendFromRow))
PageContainerContentChild.childAt(1).is(SendToRow) assert(PageContainerContentChild.childAt(1).is(SendToRow))
PageContainerContentChild.childAt(2).is(SendAmountRow) assert(PageContainerContentChild.childAt(2).is(SendAmountRow))
PageContainerContentChild.childAt(3).is(SendGasRow) assert(PageContainerContentChild.childAt(3).is(SendGasRow))
}) })
}) })
}) })

View File

@ -21,8 +21,9 @@ const MOCK_EVENT = { preventDefault: () => {} }
sinon.spy(SendFooter.prototype, 'onCancel') sinon.spy(SendFooter.prototype, 'onCancel')
sinon.spy(SendFooter.prototype, 'onSubmit') sinon.spy(SendFooter.prototype, 'onSubmit')
describe('Send Component', function () { describe('SendFooter Component', function () {
let wrapper let wrapper
let instance
beforeEach(() => { beforeEach(() => {
wrapper = shallow(<SendFooter wrapper = shallow(<SendFooter

View File

@ -16,8 +16,9 @@ const historySpies = {
sinon.spy(SendHeader.prototype, 'onClose') sinon.spy(SendHeader.prototype, 'onClose')
describe('Send Component', function () { describe('SendHeader Component', function () {
let wrapper let wrapper
let instance
beforeEach(() => { beforeEach(() => {
wrapper = shallow(<SendHeader wrapper = shallow(<SendHeader

View File

@ -27,6 +27,7 @@ sinon.spy(SendTransactionScreen.prototype, 'updateGas')
describe('Send Component', function () { describe('Send Component', function () {
let wrapper let wrapper
let instance
beforeEach(() => { beforeEach(() => {
wrapper = shallow(<SendTransactionScreen wrapper = shallow(<SendTransactionScreen