From fdde0ba10429e6841e68f10cc41298b2c20e32da Mon Sep 17 00:00:00 2001 From: Pavel Date: Fri, 23 Aug 2024 14:40:42 +0200 Subject: [PATCH] test: fix api tests after rebase --- .github/workflows/app-e2e.yml | 20 ++++---- .github/workflows/integration-tests-api.yml | 18 ++++---- .../tests/api/transactions.test.ts | 46 ++----------------- 3 files changed, 23 insertions(+), 61 deletions(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index 4c5da3cfc..8b7b90fd3 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -47,16 +47,16 @@ jobs: fail-fast: false matrix: tags: [ -# "@artifactsSet1", -# "@artifactsSet2", -# "@artifactsSet3", -# "@artifactsSet4", -# "@redirectionSet1", -# "@redirectionSet2", -# "@redirectionSet3", - "@copying" -# "@search", -# "@testnetSmokeSuite" + "@artifactsSet1", + "@artifactsSet2", + "@artifactsSet3", + "@artifactsSet4", + "@redirectionSet1", + "@redirectionSet2", + "@redirectionSet3", + "@copying" + "@search", + "@testnetSmokeSuite" ] name: '${{ matrix.tags }}' diff --git a/.github/workflows/integration-tests-api.yml b/.github/workflows/integration-tests-api.yml index d50fe6198..8ee487387 100644 --- a/.github/workflows/integration-tests-api.yml +++ b/.github/workflows/integration-tests-api.yml @@ -13,15 +13,15 @@ jobs: matrix: node-version: ['lts/*'] # 18.17.1 or lts/* test-pattern: -# - stub.test.ts -# - accounts.test.ts -# - addresses.test.ts -# - batches.test.ts -# - blocks.test.ts -# - contracts.test.ts -# - logs.test.ts -# - stats.test.ts -# - tokens.test.ts + - stub.test.ts + - accounts.test.ts + - addresses.test.ts + - batches.test.ts + - blocks.test.ts + - contracts.test.ts + - logs.test.ts + - stats.test.ts + - tokens.test.ts - transactions.test.ts name: 'API test set: ${{ matrix.test-pattern}} / Node: ${{ matrix.node-version}}' steps: diff --git a/packages/integration-tests/tests/api/transactions.test.ts b/packages/integration-tests/tests/api/transactions.test.ts index 6e63b8b92..e9b6e9db6 100644 --- a/packages/integration-tests/tests/api/transactions.test.ts +++ b/packages/integration-tests/tests/api/transactions.test.ts @@ -140,14 +140,12 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); - expect(response.body.items[0]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })); + expect(response.body.items[0]).toStrictEqual(expect.objectContaining({ tokenType: "BASETOKEN" })); expect(typeof response.body.items[1].amount).toStrictEqual("string"); expect(typeof response.body.items[1].blockNumber).toStrictEqual("number"); @@ -168,14 +166,12 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); - expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })); + expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ tokenType: "BASETOKEN" })); expect(typeof response.body.items[2].amount).toStrictEqual("string"); expect(typeof response.body.items[2].blockNumber).toStrictEqual("number"); expect(response.body.items[2]).toStrictEqual(expect.objectContaining({ fields: null })); @@ -467,10 +463,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -489,10 +483,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -511,10 +503,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -574,10 +564,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -638,10 +626,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -695,10 +681,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -717,10 +701,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -755,14 +737,12 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); - expect(response.body.items[0]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })); + expect(response.body.items[0]).toStrictEqual(expect.objectContaining({ tokenType: "BASETOKEN" })); expect(typeof response.body.items[2].amount).toStrictEqual("string"); expect(typeof response.body.items[2].blockNumber).toStrictEqual("number"); expect(response.body.items[2]).toStrictEqual(expect.objectContaining({ fields: null })); @@ -782,14 +762,12 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); - expect(response.body.items[2]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })); + expect(response.body.items[2]).toStrictEqual(expect.objectContaining({ tokenType: "BASETOKEN" })); expect(response.body.meta).toStrictEqual(expect.objectContaining({ totalItems: 3 })); expect(response.body.meta).toStrictEqual(expect.objectContaining({ itemCount: 3 })); expect(response.body.meta).toStrictEqual(expect.objectContaining({ itemsPerPage: 10 })); @@ -830,10 +808,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -852,10 +828,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -886,10 +860,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -908,10 +880,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -942,10 +912,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -964,10 +932,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -997,10 +963,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) ); @@ -1019,10 +983,8 @@ describe("Transactions", () => { iconURL: "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1698873266", l1Address: Token.ETHER_Address, l2Address: Token.ETHER_ERC20_Address, - liquidity: 220000000000, symbol: "ETH", name: "Ether", - usdPrice: 1800, }, }) );