1import { expect } from 'chai';2import waitNewBlocks from '../substrate/wait-new-blocks';3import { createEthAccountWithBalance, deployFlipper, itWeb3, contractHelpers } from './util/helpers';45describe('Helpers sanity check', () => {6 itWeb3('Contract owner is recorded', async ({ api, web3 }) => {7 const owner = await createEthAccountWithBalance(api, web3);89 const flipper = await deployFlipper(web3, owner);10 await waitNewBlocks(api, 1);1112 expect(await contractHelpers(web3, owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);13 });1415 itWeb3('Flipper is working', async ({ api, web3 }) => {16 const owner = await createEthAccountWithBalance(api, web3);17 const flipper = await deployFlipper(web3, owner);18 await waitNewBlocks(api, 1);1920 expect(await flipper.methods.getValue().call()).to.be.false;21 await flipper.methods.flip().send({ from: owner });22 await waitNewBlocks(api, 1);23 expect(await flipper.methods.getValue().call()).to.be.true;24 });25});