WA-238 Give more time to safe to show the received balance in tests

This commit is contained in:
apanizo 2018-06-04 13:55:49 +02:00
parent 504e078101
commit 9b582f658f
4 changed files with 5 additions and 4 deletions

View File

@ -68,7 +68,7 @@ const deploySafe = async (safe: React$Component<{}>, dailyLimit: string, thresho
// giving some time to the component for updating its state with safe // giving some time to the component for updating its state with safe
// before destroying its context // before destroying its context
await sleep(6000) await sleep(9000)
// THEN // THEN
const deployed = TestUtils.findRenderedDOMComponentWithClass(safe, DEPLOYED_COMPONENT_ID) const deployed = TestUtils.findRenderedDOMComponentWithClass(safe, DEPLOYED_COMPONENT_ID)

View File

@ -34,7 +34,7 @@ describe('React DOM TESTS > Multisig transactions from safe [3 owners & 1 thresh
SafeDom = renderSafe(store) SafeDom = renderSafe(store)
}) })
it('should execute transaction after 2 owners have confirmed and the last one executed correctly', async () => { it('should execute transaction straight away', async () => {
await addFundsTo(SafeDom, address) await addFundsTo(SafeDom, address)
await checkBalanceOf(address, '0.1') await checkBalanceOf(address, '0.1')
await createMultisigTxFilling(SafeDom, AddTransactionComponent, store) await createMultisigTxFilling(SafeDom, AddTransactionComponent, store)

View File

@ -71,7 +71,7 @@ describe('React DOM TESTS > Multisig transactions from safe [3 owners & 3 thresh
await checkBalanceOf(address, '0.1') await checkBalanceOf(address, '0.1')
await listTxsOf(SafeDom) await listTxsOf(SafeDom)
sleep(800) sleep(1400)
const paragraphs = getTagFromTransaction(SafeDom, 'p') const paragraphs = getTagFromTransaction(SafeDom, 'p')
const status = paragraphs[2].innerHTML const status = paragraphs[2].innerHTML

View File

@ -41,6 +41,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => {
it('should withdrawn funds under dailyLimit without needing confirmations', async () => { it('should withdrawn funds under dailyLimit without needing confirmations', async () => {
// add funds to safe // add funds to safe
await addEtherTo(address, '0.1') await addEtherTo(address, '0.1')
await sleep(3000)
const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView) const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView)
// $FlowFixMe // $FlowFixMe
@ -48,7 +49,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => {
const withdrawnButton = buttons[0] const withdrawnButton = buttons[0]
expect(withdrawnButton.props.children).toEqual(WITHDRAWN_BUTTON_TEXT) expect(withdrawnButton.props.children).toEqual(WITHDRAWN_BUTTON_TEXT)
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(withdrawnButton, 'button')[0]) TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(withdrawnButton, 'button')[0])
await sleep(1200) await sleep(4000)
const Withdrawn = TestUtils.findRenderedComponentWithType(SafeDom, WithdrawnComponent) const Withdrawn = TestUtils.findRenderedComponentWithType(SafeDom, WithdrawnComponent)
// $FlowFixMe // $FlowFixMe