remove an import of a removed component in test helper

This commit is contained in:
Mikhail Mikheev 2019-07-29 14:50:37 +04:00
parent 4d5e634f40
commit 9dfa84414e
2 changed files with 0 additions and 41 deletions

View File

@ -1,5 +1,4 @@
// @flow
export * from './moveFunds.helper'
export * from './moveTokens.helper'
export * from './threshold.helper'
export * from './transactionList.helper'

View File

@ -1,40 +0,0 @@
// @flow
import TestUtils from 'react-dom/test-utils'
import { sleep } from '~/utils/timer'
import { checkMinedTx } from '~/test/builder/safe.dom.utils'
import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts'
import Threshold from '~/routes/safe/components/Threshold'
import { whenExecuted } from '~/test/utils/logTransactions'
export const sendChangeThresholdForm = async (
SafeDom: React.Component<any, any>,
changeThreshold: React.Component<any, any>,
threshold: string,
) => {
// Load the Threshold Form
TestUtils.Simulate.click(changeThreshold)
await sleep(400)
// fill the form
const inputs = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'input')
const thresholdInput = inputs[0]
TestUtils.Simulate.change(thresholdInput, { target: { value: threshold } })
// $FlowFixMe
const form = TestUtils.findRenderedDOMComponentWithTag(SafeDom, 'form')
// submit it
TestUtils.Simulate.submit(form)
TestUtils.Simulate.submit(form)
return whenExecuted(SafeDom, Threshold)
}
export const checkMinedThresholdTx = (Transaction: React.Component<any, any>, name: string) => {
checkMinedTx(Transaction, name)
}
export const checkThresholdOf = async (address: string, threshold: number) => {
const gnosisSafe = await getGnosisSafeInstanceAt(address)
const safeThreshold = await gnosisSafe.getThreshold()
expect(Number(safeThreshold)).toEqual(threshold)
}