From f47c0799a8816aa7d482f6372ad9df514ec83399 Mon Sep 17 00:00:00 2001 From: magecnion Date: Mon, 4 Nov 2024 12:23:01 +0100 Subject: [PATCH] refactor test names --- e2e-tests/tests/test-teleport-laos.ts | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/e2e-tests/tests/test-teleport-laos.ts b/e2e-tests/tests/test-teleport-laos.ts index 5a7719d5..0a2e49cd 100644 --- a/e2e-tests/tests/test-teleport-laos.ts +++ b/e2e-tests/tests/test-teleport-laos.ts @@ -30,7 +30,7 @@ const ONE_LAOS = new BN("1000000000000000000"); const ONE_DOT = new BN("1000000000000"); const WAITING_BLOCKS_FOR_EVENTS = 20; // Number of blocks we wait at max to receive an event -describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { +describeWithExistingNode("Teleport Asset Hub <-> Laos", (context) => { const laosSiblingAccount = sovereignAccountOf(LAOS_PARA_ID); // APIS @@ -52,25 +52,25 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { alice = new Keyring({ type: "sr25519" }).addFromUri("//Alice"); alith = new Keyring({ type: "ethereum" }).addFromUri(ALITH_PRIVATE_KEY); - debugTeleport("Waiting until all the relay chain, Asset Hub and LAOS produce blocks..."); + debugTeleport("Waiting until all the relay chain, Asset Hub and Laos produce blocks..."); await Promise.all([awaitBlockChange(apiRelaychain), awaitBlockChange(apiAssetHub), awaitBlockChange(apiLaos)]); - debugTeleport("[RELAY_CHAIN] Send transaction to open HRMP channels between AssetHub and LAOS..."); // See: https://github.com/paritytech/polkadot-sdk/pull/1616 + debugTeleport("[RELAY_CHAIN] Send transaction to open HRMP channels between AssetHub and Laos..."); // See: https://github.com/paritytech/polkadot-sdk/pull/1616 await sendOpenHrmpChannelTxs(apiRelaychain, LAOS_PARA_ID, ASSET_HUB_PARA_ID); }); - step("HRMP channels between AssetHub and LAOS are open", async function () { + step("HRMP channels between AssetHub and Laos are open", async function () { expect(await isChannelOpen(apiRelaychain, LAOS_PARA_ID, ASSET_HUB_PARA_ID)).to.be.true; expect(await isChannelOpen(apiRelaychain, ASSET_HUB_PARA_ID, LAOS_PARA_ID)).to.be.true; }); - step("Create LAOS Foreign Asset in AssetHub", async function () { + step("Create $LAOS asset in AssetHub", async function () { const laosForeignAssetExists = !(await apiAssetHub.query.foreignAssets.asset(apiAssetHub.laosAssetId)).isEmpty; // NOTE: We only create the foreign asset if it hasn't been created yet, in this way we ensure tests are idempotent if (!laosForeignAssetExists) { //Fund LAOS sovereigna account - debugTeleport("[ASSET_HUB] Funding LAOS sovereign account..."); + debugTeleport("[ASSET_HUB] Funding Laos sovereign account..."); await transferBalance(apiAssetHub, alice, laosSiblingAccount, ONE_DOT.muln(100)); // Build XCM instruction @@ -102,7 +102,7 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { const alithBalanceBefore = new BN((await apiLaos.query.system.account(alith.address)).data.free); const laosBalanceBefore = new BN((await apiAssetHub.query.system.account(laosSiblingAccount)).data.free); - // Send the XCM instruction from LAOS too Asset Hub + // Send the XCM instruction from Laos to Asset Hub const sudoCall = apiLaos.tx.sudo.sudo(apiLaos.tx.polkadotXcm.send(destination, instruction)); try { await sudoCall.signAndSend(alith); @@ -136,14 +136,14 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { expect( (await apiAssetHub.query.foreignAssets.asset(apiAssetHub.laosAssetId)).isEmpty, - "LAOS foreign asset has not been created" + "$LAOS asset has not been created" ).to.be.false; } else { - debugTeleport("LAOS foreign asset already exists, skipping creation..."); + debugTeleport("$LAOS asset already exists, skipping creation..."); } }); - step("Mint LAOS foreign asset in AssetHub", async function () { + step("Mint $LAOS asset in AssetHub", async function () { // Build XCM instructions const ferdie = new Keyring({ type: "sr25519" }).addFromUri("//Ferdie"); const ferdieMultiaddress = apiAssetHub.createType("MultiAddress", ferdie.address) as MultiAddress; @@ -198,7 +198,7 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { expect(ferdieXLaosBalance.gte(new BN(0)), "Ferdie balance should be > 0"); }); - step("Create LAOS/RelayToken pool in AssetHub", async function () { + step("Create $LAOS/$DOT pool in AssetHub", async function () { // NOTE: We only create the pool if it hasn't been created yet, in this way we ensure tests are idempotent const poolExists = !( await apiAssetHub.query.assetConversion.pools([apiAssetHub.relayAssetId, apiAssetHub.laosAssetId]) @@ -277,7 +277,7 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { ); expect( ferdieXLaosBalance.gte(liquidityAmountLaos), - "Ferdie's LAOS balance should be greater than the amount to be sent to the pool" + "Ferdie's $LAOS balance should be greater than the amount to be sent to the pool" ); try { @@ -297,14 +297,14 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { } }); - step("Teleport from LAOS to AssetHub", async function () { + step("Teleport from Laos to AssetHub", async function () { const charlie = new Keyring({ type: "sr25519" }).addFromUri("//Charlie"); const destination = apiLaos.createType("XcmVersionedLocation", { V3: siblingLocation(ASSET_HUB_PARA_ID), }); - // We need to use AssetHub api otherwise we get an error as LAOS does not use AccountId32 + // We need to use AssetHub api otherwise we get an error as Laos does not use AccountId32 let accountId = apiAssetHub.createType("AccountId", charlie.address); const beneficiary = apiLaos.createType("XcmVersionedLocation", { V3: { @@ -356,7 +356,7 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { console.log("transaction failed", error); } - // Check that LAOS has been sent in Asset Hub + // Check that $LAOS has been sent in Asset Hub const event = await waitForEvent( apiAssetHub, ({ event }) => apiAssetHub.events.foreignAssets.Issued.is(event), @@ -384,7 +384,7 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { ); }); - step("Teleport back from AssetHub to LAOS", async function () { + step("Teleport back from AssetHub to Laos", async function () { const charlie = new Keyring({ type: "sr25519" }).addFromUri("//Charlie"); const destination = apiAssetHub.createType("XcmVersionedLocation", { @@ -442,7 +442,7 @@ describeWithExistingNode("Teleport Asset Hub <-> LAOS", (context) => { console.log("transaction failed", error); } - // Check that LAOS has been sent back in LAOS + // Check that $LAOS has been sent back to Laos const event = await waitForEvent( apiLaos, ({ event }) => {