Skip to content

Commit

Permalink
test: fix api tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
pcheremu committed Aug 23, 2024
1 parent f69c882 commit fdde0ba
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 61 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/app-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/integration-tests-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
46 changes: 4 additions & 42 deletions packages/integration-tests/tests/api/transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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 }));
Expand Down Expand Up @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand Down Expand Up @@ -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,
},
})
);
Expand Down Expand Up @@ -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,
},
})
);
Expand Down Expand Up @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand Down Expand Up @@ -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 }));
Expand All @@ -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 }));
Expand Down Expand Up @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand Down Expand Up @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand Down Expand Up @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand Down Expand Up @@ -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,
},
})
);
Expand All @@ -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,
},
})
);
Expand Down

0 comments on commit fdde0ba

Please sign in to comment.