Skip to content

Commit

Permalink
test: update enum Token names
Browse files Browse the repository at this point in the history
  • Loading branch information
pcheremu committed Mar 7, 2024
1 parent 1380443 commit d589cc0
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 160 deletions.
8 changes: 4 additions & 4 deletions packages/integration-tests/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ export enum Logger {
}

export enum Token {
CUST_Address = "0x0928008B245A76E105E02C522b5d309c0887ecA5",
// CUST_Address = "0x0928008B245A76E105E02C522b5d309c0887ecA5",// probably unused
customL2TokenName = "L2 ERC20 token",
customL2TokenSymbol = "L2",
customL2TokenDecimals = 18,
ETHER_PULL_Address = "0x0000000000000000000000000000000000008001",
ETHER_Address = "0x0000000000000000000000000000000000000000",
ETHER_ERC20_Address = "0x000000000000000000000000000000000000800A",
pullAddressETH = "0x0000000000000000000000000000000000008001",
addressETH = "0x0000000000000000000000000000000000000000",
ERC20AddressETH = "0x000000000000000000000000000000000000800A",
}

export enum TransactionsType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default async function callMultiTransferETH(hre: HardhatRuntimeEnvironmen
const mainWalletAddress = Wallets.mainWalletAddress;
const secondaryWalletAddress = Wallets.secondaryWalletAddress;
// type of coin, contract
const etherAddress = Token.ETHER_Address; //ETH
const etherAddress = Token.addressETH; //ETH
const customTokenI = await helper.getStringFromFile(firstToken);
const customTokenII = await helper.getStringFromFile(secondToken);
// amount of funds
Expand Down
4 changes: 2 additions & 2 deletions packages/integration-tests/tests/api/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("API module: Account", () => {
//@id1705
it("Verify /api?module=account&action=tokenbalance response", async () => {
await helper.runRetriableTestAction(async () => {
apiRoute = `/api?module=account&action=tokenbalance&contractaddress=${Token.ETHER_ERC20_Address}&address=${Wallets.richWalletAddress}`;
apiRoute = `/api?module=account&action=tokenbalance&contractaddress=${Token.ERC20AddressETH}&address=${Wallets.richWalletAddress}`;
response = await helper.performBlockExplorerApiGetRequest(apiRoute);

expect(response.status).toBe(200);
Expand Down Expand Up @@ -176,7 +176,7 @@ describe("API module: Account", () => {
await helper.runRetriableTestAction(async () => {
const blocks = await request(environment.blockExplorerAPI).get("/blocks");
const blockNumber = blocks.body.items[0].number;
apiRoute = `/api?module=account&action=tokentx&page=1&offset=10&sort=desc&endblock=${blockNumber}&startblock=0&contractaddress=${Token.ETHER_ERC20_Address}&address=${Wallets.richWalletAddress}`;
apiRoute = `/api?module=account&action=tokentx&page=1&offset=10&sort=desc&endblock=${blockNumber}&startblock=0&contractaddress=${Token.ERC20AddressETH}&address=${Wallets.richWalletAddress}`;
response = await helper.performBlockExplorerApiGetRequest(apiRoute);
console.log(apiRoute);

Expand Down
4 changes: 1 addition & 3 deletions packages/integration-tests/tests/api/addresses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ describe("Address", () => {
expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ to: contract }));
expect(typeof response.body.items[1].timestamp).toStrictEqual("string");
expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ amount: "30000000000000000" }));
expect(response.body.items[1]).toStrictEqual(
expect.objectContaining({ tokenAddress: Token.ETHER_ERC20_Address })
);
expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ tokenAddress: Token.ERC20AddressETH }));
expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ type: "transfer" }));
expect(response.body.items[1]).toStrictEqual(expect.objectContaining({ fields: null }));
expect(response.body.meta).toStrictEqual(expect.objectContaining({ totalItems: 2 }));
Expand Down
Loading

0 comments on commit d589cc0

Please sign in to comment.