From ccbd4bacc91fabb05d341cfbb945d999e13ef279 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Wed, 10 Jan 2024 09:31:32 +0100 Subject: [PATCH] test: refactoring after rebase --- packages/integration-tests/tests/api/contracts.test.ts | 5 ++--- packages/integration-tests/tests/api/logs.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/integration-tests/tests/api/contracts.test.ts b/packages/integration-tests/tests/api/contracts.test.ts index 5cd828836a..7431abd0c7 100644 --- a/packages/integration-tests/tests/api/contracts.test.ts +++ b/packages/integration-tests/tests/api/contracts.test.ts @@ -7,7 +7,7 @@ import { Buffer, Wallets } from "../../src/entities"; import { Helper } from "../../src/helper"; import { Playbook } from "../../src/playbook/playbook"; -describe("Contracts API", () => { +describe("/api", () => { jest.setTimeout(localConfig.standardTimeout); const helper = new Helper(); @@ -25,14 +25,13 @@ describe("Contracts API", () => { }); //@id1696 - it("Verify the response via /api?module=contract&action=getcontractcreation&contractaddresses={address1},{address2}", async () => { + it("Verify /api?module=contract&action=getcontractcreation&contractaddresses={address1},{address2} response", async () => { await setTimeout(localConfig.standardPause); paymasterContract = await helper.getStringFromFile(bufferFile + Buffer.paymaster); paymasterTx = await helper.getStringFromFile(bufferFile + Buffer.paymasterDeployTx); multicallCallerContract = await helper.getStringFromFile(bufferFile + Buffer.addressMultiCallCaller); multicallCallerTx = await helper.getStringFromFile(bufferFile + Buffer.txMultiCallCaller); const apiRoute = `/api?module=contract&action=getcontractcreation&contractaddresses=${paymasterContract},${multicallCallerContract}`; - console.log("apiRoute: " + apiRoute); return request(environment.blockExplorerAPI) .get(apiRoute) .expect(200) diff --git a/packages/integration-tests/tests/api/logs.test.ts b/packages/integration-tests/tests/api/logs.test.ts index 8a3b6d959d..b10624eee9 100644 --- a/packages/integration-tests/tests/api/logs.test.ts +++ b/packages/integration-tests/tests/api/logs.test.ts @@ -7,7 +7,7 @@ import { Buffer } from "../../src/entities"; import { Helper } from "../../src/helper"; import { Playbook } from "../../src/playbook/playbook"; -describe("Logs API", () => { +describe("/api", () => { jest.setTimeout(localConfig.standardTimeout); //works unstable without timeout const helper = new Helper(); const bufferFile = "src/playbook/"; @@ -22,7 +22,7 @@ describe("Logs API", () => { }); //@id1808 - it("Verify the response via /api?module=logs&action=getLogs&page={page}&offset={offset}0&toBlock={toBlock}&fromBlock={fromBlock}&address={address}", async () => { + it("Verify /api?module=logs&action=getLogs&page={page}&offset={offset}0&toBlock={toBlock}&fromBlock={fromBlock}&address={address} response", async () => { await setTimeout(localConfig.standardPause); contractAddress = await helper.getStringFromFile(bufferFile + Buffer.greeterL2); txHash = await helper.getStringFromFile(bufferFile + Buffer.executeGreeterTx);