diff --git a/packages/integration-tests/src/helper.ts b/packages/integration-tests/src/helper.ts index 0948af69f..c86ffcd10 100644 --- a/packages/integration-tests/src/helper.ts +++ b/packages/integration-tests/src/helper.ts @@ -24,8 +24,7 @@ export class Helper { } async executeScript(script: string) { - const output = execSync(script, { encoding: "utf-8" }); - + const output = execSync(script, { encoding: "utf-8", timeout: 10000 }); try { console.log(`> Run NPM Script "${script}":\n`, output); return output; diff --git a/packages/integration-tests/src/playbook/deploy/erc20toL2.ts b/packages/integration-tests/src/playbook/deploy/erc20toL2.ts index 444e8493b..8d2b211fe 100644 --- a/packages/integration-tests/src/playbook/deploy/erc20toL2.ts +++ b/packages/integration-tests/src/playbook/deploy/erc20toL2.ts @@ -12,6 +12,7 @@ export default async function (hre: HardhatRuntimeEnvironment) { const deployer = new Deployer(hre, wallet); const artifact = await deployer.loadArtifact("L2"); const contract = await deployer.deploy(artifact, []); + await contract.waitForDeployment(); const contractAddress = await contract.getAddress(); console.log(`${artifact.contractName} was deployed to ${contractAddress}`); await fs.writeFile(Buffer.L2, contractAddress); diff --git a/packages/integration-tests/src/playbook/hardhat.config.ts b/packages/integration-tests/src/playbook/hardhat.config.ts index d60e0b66c..d78763bd6 100644 --- a/packages/integration-tests/src/playbook/hardhat.config.ts +++ b/packages/integration-tests/src/playbook/hardhat.config.ts @@ -11,7 +11,7 @@ import type { HardhatUserConfig } from "hardhat/config"; const config: HardhatUserConfig = { zksolc: { - version: "1.4.1", + version: "1.5.2", compilerSource: "binary", settings: {}, }, diff --git a/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL1.ts b/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL1.ts index 5860c7bc5..73dcc8134 100644 --- a/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL1.ts +++ b/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL1.ts @@ -7,8 +7,9 @@ export const deployERC20toL1 = async function () { const bufferFile = playbookRoot + "/" + Buffer.L1; await helper.executeScript(`cd ${playbookRoot} && npm run compile`); + await helper.delay(1500); await helper.executeScript(`cd ${playbookRoot} && npm run deployToL1`); - + await helper.delay(1500); const deployedToken = await helper.getStringFromFile(bufferFile); console.log("The custom ERC20 token has been deployed to L1: ", Logger.textSeparator, deployedToken); diff --git a/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL2.ts b/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL2.ts index 5bdc254ab..4f93f6c9e 100644 --- a/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL2.ts +++ b/packages/integration-tests/src/playbook/scenarios/deploy/deployERC20toL2.ts @@ -10,8 +10,10 @@ export const deployERC20toL2 = async function () { await helper.printLog(bufferFile); await helper.executeScript(`cd ${playbookRoot} && npm run compile`); + await helper.delay(1500); await helper.executeScript(`cd ${playbookRoot} && npm run deployToL2`); - await helper.executeScript(`cat ${bufferFile}`); + await helper.delay(1500); + // await helper.executeScript(`cat ${bufferFile}`); await helper.printLog(`Return to the initial script: deployERC20toL2`); const deployedToken = await helper.getStringFromFile(bufferFile); await helper.printLog(`Before the latest PRINT in global`); diff --git a/packages/integration-tests/src/playbook/scenarios/deposit/depositETH.ts b/packages/integration-tests/src/playbook/scenarios/deposit/depositETH.ts index 36a19b4ab..2687f74b0 100644 --- a/packages/integration-tests/src/playbook/scenarios/deposit/depositETH.ts +++ b/packages/integration-tests/src/playbook/scenarios/deposit/depositETH.ts @@ -19,7 +19,7 @@ export const depositEth = async function (sum = "0.000009") { const txHash = deposit.hash; - await deposit.wait(1); + await deposit.waitL1Commit(); await helper.txHashLogger(Logger.deposit, txHash, "ETH"); return txHash; diff --git a/packages/integration-tests/tests/api/qwe.test.ts b/packages/integration-tests/tests/api/qwe.test.ts new file mode 100644 index 000000000..970525ca0 --- /dev/null +++ b/packages/integration-tests/tests/api/qwe.test.ts @@ -0,0 +1,9 @@ +import { localConfig } from "../../src/config"; + +describe("A stub", () => { + jest.setTimeout(localConfig.standardTimeout); + //@id1513 + it("Self test", async () => { + expect(200).toBe(200); + }); +});