From 9928fa2a6e3f176c8f66731a29d153a93162baa6 Mon Sep 17 00:00:00 2001 From: apanizo Date: Fri, 8 Jun 2018 09:31:19 +0200 Subject: [PATCH] WA-234 Fixing tests --- .../safe/test/Safe.multisig.1owners1threshold.test.js | 2 +- src/routes/safe/test/Safe.withdrawn.test.js | 6 +++--- src/routes/safe/test/testMultisig.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes/safe/test/Safe.multisig.1owners1threshold.test.js b/src/routes/safe/test/Safe.multisig.1owners1threshold.test.js index 80d8b697..68ef3ed3 100644 --- a/src/routes/safe/test/Safe.multisig.1owners1threshold.test.js +++ b/src/routes/safe/test/Safe.multisig.1owners1threshold.test.js @@ -45,7 +45,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => { // $FlowFixMe const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button) - const addTxButton = buttons[2] + const addTxButton = buttons[3] expect(addTxButton.props.children).toEqual(ADD_MULTISIG_BUTTON_TEXT) await sleep(1800) // Give time to enable Add button TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(addTxButton, 'button')[0]) diff --git a/src/routes/safe/test/Safe.withdrawn.test.js b/src/routes/safe/test/Safe.withdrawn.test.js index a985b3cc..d3df01bc 100644 --- a/src/routes/safe/test/Safe.withdrawn.test.js +++ b/src/routes/safe/test/Safe.withdrawn.test.js @@ -46,7 +46,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => { // $FlowFixMe const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button) - const withdrawnButton = buttons[1] + const withdrawnButton = buttons[2] expect(withdrawnButton.props.children).toEqual(WITHDRAWN_BUTTON_TEXT) TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(withdrawnButton, 'button')[0]) await sleep(4000) @@ -96,7 +96,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => { const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView) // $FlowFixMe const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button) - const addTxButton = buttons[2] + const addTxButton = buttons[3] expect(addTxButton.props.children).toEqual(ADD_MULTISIG_BUTTON_TEXT) expect(addTxButton.props.disabled).toBe(true) @@ -110,7 +110,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => { const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView) // $FlowFixMe const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button) - const addTxButton = buttons[1] + const addTxButton = buttons[2] expect(addTxButton.props.children).toEqual(WITHDRAWN_BUTTON_TEXT) expect(addTxButton.props.disabled).toBe(true) diff --git a/src/routes/safe/test/testMultisig.js b/src/routes/safe/test/testMultisig.js index 9c10e3c2..8e469410 100644 --- a/src/routes/safe/test/testMultisig.js +++ b/src/routes/safe/test/testMultisig.js @@ -48,7 +48,7 @@ export const addFundsTo = async (SafeDom: React$Component, destination // $FlowFixMe const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button) - const addTxButton = buttons[2] + const addTxButton = buttons[3] expect(addTxButton.props.children).toEqual(ADD_MULTISIG_BUTTON_TEXT) await sleep(1800) // Give time to enable Add button TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(addTxButton, 'button')[0]) @@ -59,7 +59,7 @@ export const listTxsOf = (SafeDom: React$Component) => { // $FlowFixMe const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button) - const seeTx = buttons[3] + const seeTx = buttons[4] expect(seeTx.props.children).toEqual(SEE_MULTISIG_BUTTON_TEXT) TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(seeTx, 'button')[0]) }