fix send funds tests
This commit is contained in:
parent
232c7416a9
commit
dcdc965984
|
@ -49,4 +49,4 @@ export const isAddressAToken = async (tokenAddress: string) => {
|
||||||
return call !== '0x'
|
return call !== '0x'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isTokenTransfer = async (data: string, value: number) => data.substring(0, 10) === '0xa9059cbb' && value === 0
|
export const isTokenTransfer = async (data: string, value: number) => data && data.substring(0, 10) === '0xa9059cbb' && value === 0
|
||||||
|
|
|
@ -137,7 +137,6 @@ class Layout extends React.Component<Props, State> {
|
||||||
className={classes.send}
|
className={classes.send}
|
||||||
onClick={() => showSendFunds('Ether')}
|
onClick={() => showSendFunds('Ether')}
|
||||||
disabled={!granted}
|
disabled={!granted}
|
||||||
testId="balance-send-btn"
|
|
||||||
>
|
>
|
||||||
<CallMade alt="Send Transaction" className={classNames(classes.leftIcon, classes.iconSmall)} />
|
<CallMade alt="Send Transaction" className={classNames(classes.leftIcon, classes.iconSmall)} />
|
||||||
Send
|
Send
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { fireEvent } from '@testing-library/react'
|
import { fireEvent, waitForElement } from '@testing-library/react'
|
||||||
import { sleep } from '~/utils/timer'
|
import { sleep } from '~/utils/timer'
|
||||||
|
|
||||||
export const fillAndSubmitSendFundsForm = async (
|
export const fillAndSubmitSendFundsForm = async (
|
||||||
|
@ -24,7 +24,7 @@ export const fillAndSubmitSendFundsForm = async (
|
||||||
fireEvent.click(reviewBtn)
|
fireEvent.click(reviewBtn)
|
||||||
|
|
||||||
// Submit the tx (Review Tx screen)
|
// Submit the tx (Review Tx screen)
|
||||||
const submitBtn = SafeDom.getByTestId('submit-tx-btn')
|
const submitBtn = await waitForElement(() => SafeDom.getByTestId('submit-tx-btn'))
|
||||||
fireEvent.click(submitBtn)
|
fireEvent.click(submitBtn)
|
||||||
await sleep(1000)
|
await sleep(1000)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue