1import { expect } from 'chai';2import waitNewBlocks from '../substrate/wait-new-blocks';3import { createEthAccountWithBalance, deployFlipper, itWeb3, usingWeb3Http, contractHelpers } from './util/helpers';45itWeb3('Contract owner is recorded', async ({ api, web3 }) => {6 await usingWeb3Http(async web3Http => {7 const owner = await createEthAccountWithBalance(api, web3Http);89 const flipper = await deployFlipper(web3Http, owner);10 await waitNewBlocks(api, 1);1112 expect(await contractHelpers(web3, owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);13 });14});1516itWeb3('Flipper is working', async({api}) => {17 await usingWeb3Http(async web3Http => {18 const owner = await createEthAccountWithBalance(api, web3Http);19 const flipper = await deployFlipper(web3Http, owner);20 await waitNewBlocks(api, 1);2122 expect(await flipper.methods.getValue().call()).to.be.false;23 await flipper.methods.flip().send({from: owner});24 await waitNewBlocks(api, 1);25 expect(await flipper.methods.getValue().call()).to.be.true;26 });27});