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'
|
||||
}
|
||||
|
||||
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}
|
||||
onClick={() => showSendFunds('Ether')}
|
||||
disabled={!granted}
|
||||
testId="balance-send-btn"
|
||||
>
|
||||
<CallMade alt="Send Transaction" className={classNames(classes.leftIcon, classes.iconSmall)} />
|
||||
Send
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
import * as React from 'react'
|
||||
import { fireEvent } from '@testing-library/react'
|
||||
import { fireEvent, waitForElement } from '@testing-library/react'
|
||||
import { sleep } from '~/utils/timer'
|
||||
|
||||
export const fillAndSubmitSendFundsForm = async (
|
||||
|
@ -24,7 +24,7 @@ export const fillAndSubmitSendFundsForm = async (
|
|||
fireEvent.click(reviewBtn)
|
||||
|
||||
// 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)
|
||||
await sleep(1000)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue