WA-234 Fixing tests
This commit is contained in:
parent
801dde497e
commit
9928fa2a6e
|
@ -45,7 +45,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => {
|
||||||
|
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
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.children).toEqual(ADD_MULTISIG_BUTTON_TEXT)
|
||||||
await sleep(1800) // Give time to enable Add button
|
await sleep(1800) // Give time to enable Add button
|
||||||
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(addTxButton, 'button')[0])
|
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(addTxButton, 'button')[0])
|
||||||
|
|
|
@ -46,7 +46,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => {
|
||||||
|
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
||||||
const withdrawnButton = buttons[1]
|
const withdrawnButton = buttons[2]
|
||||||
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(4000)
|
await sleep(4000)
|
||||||
|
@ -96,7 +96,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => {
|
||||||
const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView)
|
const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView)
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
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.children).toEqual(ADD_MULTISIG_BUTTON_TEXT)
|
||||||
expect(addTxButton.props.disabled).toBe(true)
|
expect(addTxButton.props.disabled).toBe(true)
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ describe('React DOM TESTS > Withdrawn funds from safe', () => {
|
||||||
const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView)
|
const Safe = TestUtils.findRenderedComponentWithType(SafeDom, SafeView)
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
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.children).toEqual(WITHDRAWN_BUTTON_TEXT)
|
||||||
expect(addTxButton.props.disabled).toBe(true)
|
expect(addTxButton.props.disabled).toBe(true)
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ export const addFundsTo = async (SafeDom: React$Component<any, any>, destination
|
||||||
|
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
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.children).toEqual(ADD_MULTISIG_BUTTON_TEXT)
|
||||||
await sleep(1800) // Give time to enable Add button
|
await sleep(1800) // Give time to enable Add button
|
||||||
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(addTxButton, 'button')[0])
|
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(addTxButton, 'button')[0])
|
||||||
|
@ -59,7 +59,7 @@ export const listTxsOf = (SafeDom: React$Component<any, any>) => {
|
||||||
|
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
const buttons = TestUtils.scryRenderedComponentsWithType(Safe, Button)
|
||||||
const seeTx = buttons[3]
|
const seeTx = buttons[4]
|
||||||
expect(seeTx.props.children).toEqual(SEE_MULTISIG_BUTTON_TEXT)
|
expect(seeTx.props.children).toEqual(SEE_MULTISIG_BUTTON_TEXT)
|
||||||
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(seeTx, 'button')[0])
|
TestUtils.Simulate.click(TestUtils.scryRenderedDOMComponentsWithTag(seeTx, 'button')[0])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue